Checking for Error during execution of a procedure in oracle

Posted by Sumit Sharma on Stack Overflow See other posts from Stack Overflow or by Sumit Sharma
Published on 2010-04-29T02:20:12Z Indexed on 2010/04/29 2:27 UTC
Read the original article Hit count: 292

Filed under:
|
create or replace procedure proc_advertisement(CustomerID in Number,
NewspaperID in number,
StaffID in Number,
OrderDate in date,
PublishDate in date,
Type in varchar,      
Status in varchar, 
Units in number) is 

begin 

insert into PMS.Advertisement(CustomerID, NewspaperID, StaffID, OrderDate, PublishDate, 
Type, Status, Units) 
values(CustomerID,NewspaperID, StaffID, OrderDate, PublishDate, 
Type, Status, Units); 
dbms_output.put_line('Advertisement Order Placed Successfully'); 
end;

How to check for if any error has occurred during the execution of the procedure and if any error has occurred then I wish to display an error message.

© Stack Overflow or respective owner

Related posts about Oracle

Related posts about stored-procedures