Subject Exceptions within Stored Procedures
Author Epstein, Ed
I am calling a procedure from another procedure. I would like to trap its
exceptions within the calling procedure and use them. I understand I can do
that with the WHEN statement I beleive. How do I tell which user-defined
exception was triggered? As far as I know all user-defined exceptions fall
under SQLCODE -836.

Ex.

SELECT A FROM CALLED_PROC(:PASSED_VAR) INTO :CATCH_VAR;

WHEN SQLCODE = -836 GO TO ..........