Rony G. Flatscher wrote:
> In the process of turning BSF4Rexx to using the new APIs it becomes
> possible to raise conditions.
>
> Each numbered error category has a message number 900 which allows for
> supplying any text describing the concrete error.
>
> The question: what convention should be used to create that string
> such, that a Rexx coder could extract from the message the external
> Rexx function that caused it.
>
> E.g., if the convention would be:
> <library_name><slash><externalRoutineOrExternalMethodKeyword><slash><nameOfExternalRoutineOrMethod><space><library_error_number><colon><space><library_error_text>,
> then the following could be achieved (provided, this is prominently
> documented) with any error message from a subcode error number 900:
>
>     * a Rexx coder can parse the different parts of the error message,
>       learning about the library, library routine or method, library
>       error number and the error text,
>     * such that if one uses multiple libraries, one could still
>       determine exactly from which library and external routine or
>       external method the error comes from, just by
>       reading/analyzing/parsing the error message, if it is of subcode
>       900.
>
> In the following exmples using the "BSF4Rexx" library as an example,
> the <externalRoutineOrExternalMethodKeyword> values would be "routine"
> or "method":
>
>     BSF4Rexx/routine/BsfLoadJava 1: JVM is already loaded
>     BSF4Rexx/routine/BsfLoadJava 2: JVM could not be created.
>     BSF4Rexx/routine/BsfLoadJava 3: Initilization error: could not
>     find javai/jvm-DLL/so
>
>     BSF4Rexx/routine/BSF 1.123: Java exception thrown: [Java-related
>     text explaining the error]
>     ...
>
In the meantime, having had some experiencing time with such error
messages, I would like to suggest to append an opening and closing
parenthesis to the names of routines to distinguish them easily from
method invocations; insert also the word "error" between the
routine/method name and the error number to make the number immediately
identifiable as being an error number.

Hence examples of such error messages would look like:

    BSF4Rexx/routine/BsfLoadJava() error 1: JVM is already loaded
    BSF4Rexx/routine/BsfLoadJava() error 2: JVM could not be created.
    BSF4Rexx/routine/BsfLoadJava() error 3: Initilization error: could
    not find javai/jvm-DLL/so
    BSF4Rexx/routine/BsfUnloadJava() error 4.999: JVM was not loaded by Rexx

    BSF4Rexx/routine/BSF() error 1.123: Java exception thrown:
    [Java-related text explaining the error]
    ...

> Would that be a sensible convention? Do you see any problems with such
> a convention? Do you have alternative ideas?
---rony


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to