Re: Don't sure whether it's a bug for raising an exception manually?

  • From: Jonathan Lewis <jlewisoracle@xxxxxxxxx>
  • To: Oracle L <oracle-l@xxxxxxxxxxxxx>
  • Date: Sun, 17 Oct 2021 07:57:45 +0100

In your exception clause you've handled the error (ctas_error) so the error
exists no more and the trigger code can complete successfully.

If you want an error to be passed on upwards (i.e. for the trigger to fail)
you have to raise another exception; typically you do this with the key
word "raise;" though sometimes people will (as you have done in the first
version of the code) "raise_application_error(......)" with some text that
you think is more informative that the internal Oracle error message.

Regards
Jonathan Lewis



On Sun, 17 Oct 2021 at 02:47, Quanwen Zhao <quanwenzhao@xxxxxxxxx> wrote:



---------- Forwarded message ---------
发件人: Quanwen Zhao <quanwenzhao@xxxxxxxxx>
Date: 2021年10月16日周六 下午6:26
Subject: Don't sure whether it's a bug for raising an exception manually?
To: <oracle-l@xxxxxxxxxxxxx>

*exception*
*  when ctas_err then*
*    dbms_output.put_line('Do not allow to CTAS big table ' || t_name ||
' without keyword nologging.');*
end;
/




Other related posts:

  • » Re: Don't sure whether it's a bug for raising an exception manually? - Jonathan Lewis