10-13-2016 8:00 AM
I'm trying to use RAISE EXCEPTION TYPE within a method.
But when I test the path I get an UNCAUGHT_EXCEPTION exception run time error.
I've googled for solutions and I can't find any answers. I've seen other code usage doing the same thing in other programs so it works. I am missing something...
Thank you in advance for help.
Glenn Allen
<personal information removed by moderator>
10-13-2016 8:05 AM
From the dump, it looks like you've thrown the error from your method, but nothing further up the call hierarchy has caught it. The calling method must either handle the exception, or throw it up to a higher level.
e.g
TRY.
object->get_current_per_yr( .... ).
CATCH zcx_zz_msg into DATA(error). " Error handling
ENDTRY.
10-13-2016 11:37 AM
11-02-2016 4:23 PM
You need to have the TRY.. CATCH .. ENTRY block to catch this exception where the method is being called. If you are not calling this method directly but, this method is called from another method, then all the methods of the call stack needs to have the exception declared in the method signature.
Refer:
Regards.