Let us get away from the globals as much as we can. This can easily
(I think) be taken care of by having the _exception_ itself have the
uncaught handler

        $exception = Exception::whatever->new
        $exception->uncaught_handler = CODEREF

<chaim>

>>>>> "JM" == James Mastros <[EMAIL PROTECTED]> writes:

JM> My proposal is:
JM> $Exception::<whatever>::onuncaught = CODEREF.

JM> Yes, this is a global.  It has to be; the definition of when/how this gets
JM> called is that if the unwind stack goes all the way /past/ the root of the
JM> code, this code ref gets called.  The only parameter is the exception.  The
JM> defalut would be sub {die shift;} (for "obviously" fatal things), which
JM> would make the program exit with a fatal exception.  Other normal choices
JM> would be undef, ignore it (non-defualt warnings, like bareword), and sub
JM> {warn shift;}, print out a warning message (default warnings, like... I
JM> can't think of any).

JM> The value of onuncaught should follow isa if it doesn't exist.

-- 
Chaim Frenkel                                        Nonlinear Knowledge, Inc.
[EMAIL PROTECTED]                                               +1-718-236-0183

Reply via email to