Currently, that is the only solution I know of. With the new APIs, you'll
be able to retrieve the information from the condition object associated
with the error.
Rick
On 1/26/06, Rony G. Flatscher <Rony.Flatscher@...> wrote:
>
> Hi there,
>
> maybe a stupid question, still it is a seriously meant question!
> :)
>
> What would be the easiest way to get at the (oo)Rexx error strings from
> C(++) from that are displayed at runtime?
>
> E.g. given a Rexx program:
>
> say "An intentional division by 0 error..."
> say "a/0=3D"a/0
>
> will yield the following error message in ooRexx (three lines):
>
> 2 *-* say "a/0=3D"a/0
> Error 41 running E:\tmp\rexx\aha.rex line 2: Bad arithmetic conversion
> Error 41.1: Nonnumeric value ("A") used in arithmetic operation
>
> Purpose: if invoking a Rexx program via C(++) causes Rexx to be
> prematurely ended, I would like to return not only the fact that an error
> occurred (some error number), but also these error messages (always three
> lines to stderr: ?), such that it becomes possible to position e.g. an
> editor at the right line (and if a column is given even to that column).
>
> The only idea with which I could come up with was to have a RXSIO/RXSIOTR=
C
> system exit which copies the strings into a three element string array in=
a
> round robin fashion. In case an error occurred I would then blindly take =
the
> last three received strings and return them as the Rexx error message for
> further processing.
>
> Does that sound right? Is there a simpler solution to this problem that
> you know of?
>
> Regards,
>
> ---rony
>
>
>
>
|