Re: A83: Error handlers [83]
[Prev][Next][Index][Thread]
Re: A83: Error handlers [83]
> It works like try/catch in java.
>
> try { pushErrorHandler
>
> ...
>
> } popErrorHandler
> catch( ... )
> { ... } the code you install as an error handler.
>
> Linus
Thanks, but I've read that before on this mailinglist.
I looked a bit around and I found something in the sdk83pguide.pdf,
To install a error handler do:
LD HL,foobar
CALL _pushErrorHandlER
6 pushes are made to the stack (SP)
You may not PUSH nor POP nor CALL after an error-handler is installed...
----
and to deinstall:
CALL _popErrorHandleR
the 6 pushes are removed from the stack (SP)
----
Now, if an error-handler is in place and an error occures, the 6 pushes are
removed again (SP is restored, the error-handler is deinstalled), and there
wil be a jump to the lable you pointed at ('foobar' in this example). The
'error-code' will be in the accumulator (register A).
----
Has somebody anything to say on this??? Are there any stange things I
should know?
Follow-Ups: