On 14.08.2022 15:05, Rick McGuire wrote:

On Sun, Aug 14, 2022 at 8:17 AM Rony G. Flatscher <rony.flatsc...@wu.ac.at> 
wrote:

    On 14.08.2022 13:41, Rick McGuire wrote:
    > - The method NativeActivation::checkConditions() is where the raised 
exceptions are
    processed when
    > your external routine returns. Understanding why that code is not raising 
the exception on the
    > calling Rexx code would be helpful.

    The conditionObj NativeActivation::checkConditions() is NULL right before 
returning.


That would suggest you are using the wrong context to raise the exception, because the one you used was returning true for CheckCondition(). CheckCondition() just checks the value of the conditionObj variable.

Added debug output in native code. "root_RII" is the (primodal) Rexx instance that is globally available. Also the context gets shown its threadContext and threadContext's instance.

Here the relevant ouput:

   --->hi from test.rex
   j4: org.rexxla.bsf.engines.rexx.RexxProxy@6ae40994
   *** BSF() 1, tid=[24300]/countBSF=[132],
   BSF(): root_RII=[0000028AB994F3A0] tid=[24300] | context=[000000E57790CE38] 
->rtc=[0000028AB994EDF8] ->instance=[0000028AB994F3A0]
            condition=[0]: BEFORE calling Java --->)
   BSF(): root_RII=[0000028AB994F3A0] tid=[24300] | context=[000000E57790CE38] 
->rtc=[0000028AB994EDF8] ->instance=[0000028AB994F3A0]
            context->CheckCondition=[0] context->CheckCondition=[1] 
jenv->ExceptionCheck=[-858993460]: AFTER  calling Java. <--

   *** *** DEBUG_BSF_FUNCTION: BSF() 5 - <==> (AFTER  -> CallObjectMethod(), 
tid=[24300]/countBSF=[132], j_returnValue=[0000000000000000] ...)
   *** *** DEBUG_BSF_FUNCTION: BSF() 5b: Java exception, now: 
(RgfCreateRexxSyntaxConditionWithJavaThrowable())
   *** *** DEBUG_BSF_FUNCTION: BSF() 5c: about to return with NULL: 
context->CheckCondition()=1
   BSF(): root_RII=[0000028AB994F3A0] tid=[24300] | context=[000000E57790CE38] 
->rtc=[0000028AB994EDF8] ->instance=[0000028AB994F3A0]
            context->CheckCondition=[1] context->CheckCondition=[1]: Java threw an 
exception we did a CreateException(), before returning. <--

   
/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\
   res: RESULT :( :( :( we never should arrive here in case of a pending exception! 
<=== <== <=
   
\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-/

---rony

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

Reply via email to