#735 rexx.exe not showing error message

v4.0
closed
Rick McGuire
5
2012-08-14
2009-06-21
No

As https://sourceforge.net/tracker/?func=detail&aid=2809505&group_id=119701&atid=684730 is closed already, I had to open this one.

Location of the uploaded package containing the new archive and the updated readme.txt: http://wi.wu.ac.at/rgf/tmp/200906_tmp/.


Having read your comments and analyzing the code, I think that there is indeed an error with rexx.exe not showing the error message in this particular use case:

  • a Rexx script is executed by rexx.exe and calls an external routine that raises an error condition before returning from the call,

  • the script is terminated because of the raised error condition, but the error message in the Rexx script, is not given by rexx.exe.

So I created a new self-contained archive, containing a stripped-down, bare-bone Rexx script with the purpose of showing the error.

However, before you can run the script with "rexx 01_getText.rex" you would need to set-up your environment such, that the jar-file and jvm.dll can be found:

  • open a command line window and extract "bsf4rexx_20090621.zip", change into the subdirectory "bsf4rexx_20090621"

  • run the following command to set the CLASSPATH:

    set CLASSPATH=%cd%\bsf4rexx_jars_20090621.jar;.;%CLASSPATH%

  • run the supplied java program to learn about the path to the "jvm.dll" on your particular installation:

    java WhereIsJavaDLL

mark&copy the last line of the output (which should look something like "set PATH=%PATH%;...", paste it and execute it

  • then just run

    rexx 01_getText.rex

In my case this is the output:

E:\rony\dev\bsf\src\source_cc_40\bsf4rexx_20090621>rexx 01_getText.rex
[Fatal Error] :1:1: Content is not allowed in prolog.

BSF(), /// around line # 4797, about to return to Rexx, context->CheckCondition()=[1] \\ <<<


The Java dispatcher now behaves as it should, so if you used that one to run the same script you would get to see the missing error message:

rexxj2 01_getText.rex

In my case this is the output:

E:\rony\dev\bsf\src\source_cc_40\bsf4rexx_20090621>rexxj2 01_getText.rex
[Fatal Error] :1:1: Content is not allowed in prolog.

BSF(), /// around line # 4797, about to return to Rexx, context->CheckCondition()=[1] \\ <<<
RexxDispatcher.java: Throwable of type 'org.rexxla.bsf.engines.rexx.RexxException' thrown while invoking Rexx: getLocalizedMessage(): [BSF4Rexx/routine/jniRexxRunProgram() error 8:
9 - parser~parse(xmlFileName) / will create an error, if no filename (empty string) is given
/
Error 40 running E:\rony\dev\bsf\src\source_cc_40\bsf4rexx_20090621\01_getText.rex line 9: Incorrect call to routine
Error 40.900: BSF4Rexx/routine/BSF() error 3: Java exception occurred: [org.apache.bsf.BSFException: /// Java-exception (RexxAndJava) occurred: [java.lang.reflect.InvocationTargetException]
, getCause(): [org.xml.sax.SAXParseException: Content is not allowed in prolog.] \\ BSF4Rexx subfunction "invoke": object 'com.sun.org.apache.xerces.internal.parsers.SAXParser@911f71' - method [PARSE], method not found or error (exception) executing method!]]


The string ">>> BSF(), /// around line # 4797, about to return to Rexx, context->CheckCondition()=[1] \\ <<<" comes from BSF4Rexx.cc (from the external BSF() routine) immediately before returning to Rexx.

Discussion

  • Rick McGuire
    Rick McGuire
    2009-06-21

    Committed revision 4822.

     
  • Mark Miesfeld
    Mark Miesfeld
    2010-02-19

    The fix for this item was in the 4.0.0 release.

     


Anonymous


Cancel   Add attachments