Skip to Content
avatar image
Former Member

using RAISE EXCEPTION TYPE and not get the runtime error UNCAUGHT_EXCEPTION

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>

capture.jpg (107.0 kB)
capture1.jpg (133.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Oct 13, 2016 at 07: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.
    Add comment
    10|10000 characters needed characters exceeded

  • Oct 13, 2016 at 10:37 AM
    Add comment
    10|10000 characters needed characters exceeded

  • Nov 02, 2016 at 04: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.

    Add comment
    10|10000 characters needed characters exceeded