-
I have stripped off the trigger of all its business logic and kept the bare minimum to highlight the point :
Trigger :
======
CREATE OR REPLACE TRIGGER tr_bd_try
before delete on try
for each row
declare
lv_count number;
my_exception exception;
begin
select count(1) into lv_count
from system_codes;
/* if there are any rows present , do not perform the delete */
if lv_count > 0 then
raise my_exception;
end if;
exception
when my_exception then
raise_application_error('-20099','My Handled Error Message');
end;
/
***************
When a delete statement is executed, it produces this :
SQLWKS> delete from try where id=3;
ORA-20099: My Handled Error Message
ORA-06512: at "TR_BD_TRY", line 15
ORA-04088: error during execution of trigger TR_BD_TRY'
I am Ok with the first message since that is defined by me, but I dont want the ORA-06512 and ORA-04088 to appear.
How can I suppress those and only have my error message ?
Thanks
HN
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|