E.g. rxapi.pdf "1.17.189. *NEW* ThrowException/0/1/2" states: "Throw a SYNTAX condition. The API call doesn't return and the current method, routine, or exit is exited immediately.".

Testing ThrowException1() however will end the running Rexx program immediately not the current call, here the calling sequence:

 * test.rex requires some testpkg.cls, creating an object o of a class residing 
in testpkg.cls
 * test.rex will send an unknown message with two arguemtns to o causing the 
unknown method to call
   a routine in the native code
 * the native code will cause a runtime exception to be thrown if one of the 
two arguments has the
   value 1

Using RaiseException1() will cause that exception to be raised and the control gets back to the unknown method and then back to test.rex.

Using ThrowException1() however will cause ending Rexx altogether as if it causes not only the call to the native routine to be exited immediately, but also the unknown method from which the call started and info.rex where o's unknown method gets invoked from. Is that to be expected? If so, when would one want to use ThrowException[0|1|2|3] over RaiseException[0|1|2|3]?

---rony

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to