[parrot/parrot] 29545e: [GH #816] Check if you're dying by interp->final_e...
noreply at github.com
Wed Aug 22 06:57:38 UTC 2012
Author: Bart Wiegmans <bartwiegmans at gmail.com>
Date: 2012-08-21 (Tue, 21 Aug 2012)
[GH #816] Check if you're dying by interp->final_exception
In a branch of mod_parrot designed to ease the writing of
exception handlers, I noted that the API cannot catch exceptions twice.
On throwing an exception and the interpreter 'dies', it returns to the
api call via longjmp(), and sets some values upon the interpreter object.
Based upon these values, the api call returns 0, upon which the exception
is retrieved and inspected. Best example: show_last_error_and_exit.
We should just check for the last_exception being PMCNULL; if so you can
jump out (we are already dying) and if not set already_dying.
More information about the parrot-commits