Avatar of Alex Porter
Alex Porter
Flag for United States of America

asked on 

Exit/stop/kill PLSQL procedure

Lets say I have two packages, each with one procedure (as a simplified example):

PACKAGE_1.PROCEDURE_A is a very long procedure with a bunch of steps.  Mid-way through it calls PACKAGE_2.PROCEDURE_X.  Lets say that mid-way through PACKAGE_2.PROCEDURE_X I encounter a problem, and raise an exception.  The exception uses RAISE_APPLICATION_ERROR to stop the procedure, but this causes an un-user-friendly message to be displayed in my application.  I am looking for a way to simply exit/stop/kill the entire procedure, as if PACKAGE_1.PROCEDURE_A had completed without a hitch.  The reason I want to do this is because as part of my exception handling I insert errors messages into a table, which is subsequently reflected nicely through the UI.  

How can I make the procedures stop running without using RAISE_APPLICATION_ERROR?

Alex Porter
Oracle Database

Avatar of undefined
Last Comment
Alex Porter

8/22/2022 - Mon