Dear developers,

In one of the sample files interface.rex there is an intended error produced to show the point. The output is the following:

    70 *-* say g~name
REX0093E: Error 93 running /Users/po/ooRexxSamples/oorexx/interface.REX line 70:  Incorrect call to method.
REX0665E: Error 93.965:  Method NAME is ABSTRACT and cannot be directly invoked.

I am trying to catch this error by using

self~expectSyntax(93.965) (or self~expectSyntax(93) and many variations) but cannot catch it. The source code in question is

-- a mixin is still a class and can be instantiated.  The abstract methods
-- will give an error if invoked
g=.shape~new
if g~isa(.shape) then say "a" g~class~id "is a shape"
-- invoking abstract method results in a runtime error.
say g~name
say "g~area:" g~area

How do I catch a runtime error in a testcase? can it be done?

I have enclosed the sample program

Attachment: interface.rex
Description: Binary data


Von meinen Macbook gesendet

Hälsningar/Regards/Grüsse,
P.O. Jonsson



_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to