Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Nesting error handler

3 views
Skip to first unread message

Roderik

unread,
Apr 21, 2007, 2:55:37 PM4/21/07
to
Hi everybody,

Question in short:
How do I get my own error handler "for a while" while keeping a
general event handler in place?

In detail:
I am trying to write a program that would help me keep track of Mah-
Jongg scores.
This program is written in OPL, and based on RMREvent (thank you, Al
Richey!)

This program already has an event handler in the main run loop, which
I'ld like to keep.
However, further down the line, I want to have a "local" error
handling for evaluating the score from a string
This is what I tried:

proc scoreDialog(playerNo%)
< init var's>
again::
ONERR again
<present a dialog to ender a score-string (e.g. 12+14*2)>
<use EVAL to calculate a score from that.>
ONERR OFF
endp

This way, I thought, the dialog should be presented again when there's
an error
However, when there's an error, the global error handler kicks in

I must be making a mistake here, so I would be grateful of someone
could nudge me in the right direction

Thanks for your time,
Roderik

0 new messages