How can you create and raise your own customized exception in PL/SQL block?
1 comment
Leave a comment
You must be logged in to post a comment.
Programming in PHP, C, C#, ASP.NET, Java, Objective-C, SQL also for MS SQL Server, Oracle & MySQL Development
How can you create and raise your own customized exception in PL/SQL block?
You must be logged in to post a comment.
Just add a BEGIN EXCEPTION and END block where you want to to be. For example…
create or replace procedure…
my_exception EXCEPTION;
begin
begin
do some stuff…
if condition then
raise my_exception;
endif;
exception
when my_exception THEN
handle the exception
end;
more stuff…
exception
when others then
end;