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.
<personal information removed by moderator>
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.
TRY. object->get_current_per_yr( .... ). CATCH zcx_zz_msg into DATA(error). " Error handling ENDTRY.
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.