Code: Select all
ServerJob ---> ParallelJob(LogSuccess) ExceptionActivity ---> ParallelJob(LogError) ---> Terminator
The server job calls the Stored Procedure using STP Stage. The SP has an exception handler defined as RAISE_APPLICATION_ERROR (-20002, 'Invalid job code ''' || job_code || '''').
I would like to be able to log this error message ('Invalid job code <code>') in the Parallel Job following the exception activity.
When the Server Job aborts the exception is called as expected, but although I can see the correct error being raised in the Server Job log:
the Exception Activity only provides me with the following values:Test_CREATE_JOB_INSTANCE.abc_START.Test_CREATE_JOB_INSTANCE: ORA-20002: Invalid job code 'abc' ORA-06512: at "DM.TEST", line 62 ORA-06512: at line 1
exc_Exception.$ErrSource = "job_PMDCreateProcessInstance"
exc_Exception.$ErrNumber = 1
exc_Exception.$ErrMessage = "Unhandled abort encountered in job Test_CREATE_JOB_INSTANCE.abc_START"
Is there anyway to make the Exception Activity return the actual error number and message that has been raised by the aborted job?