Oops, accidentally sent message. Here's the final version.
Chaim Frenkel wrote:
>
> Actually, why not simply unwind the call stack to the routine that
> has the pragma active.
>
> sub foo {use exception; &baz()}
>
> sub baz { throw "a fit" }
>
> sub bar {
> no exception;
> &foo();
> }
I don't think that will work. Some routines on the way may expect
to get a chance at $err_code to do their cleanups, and now they're
toast.
> The unwind logic would treat a scope with no exception set _as if_
> each call were wrapped in at try block.
I don't think so. If no exception is in scope Perl should continue
to generate and propagate exceptions (die and $@) as it does now,
so we don't break tradition.
> Fatal checking, is for core functions. And optional for module
> authors.
Yes.
> Then Fatal.pm and exception.pm could possibly be consolidated.
Yes.
Especially if we do that auto-fatal under try thing some others
have written about. I have think about that some more before I
can try to say something intelligent, though. That would imply
dynamic scope for use fatal, and I think it should probably have
lexical scope.
Yours, &c, Tony Olekshy
- Re: On the case for exception-based error handlin... Peter Scott
- Re: On the case for exception-based error han... Tony Olekshy
- Re: On the case for exception-based error... Peter Scott
- Re: On the case for exception-based ... Tony Olekshy
- Re: On the case for exception-based ... Bennett Todd
- Re: On the case for exception-based ... Peter Scott
- Re: On the case for exception-based ... Bennett Todd
- Re: On the case for exception-based ... Peter Scott
- Re: On the case for exception-based error handling. Chaim Frenkel
- Re: On the case for exception-based error handlin... Tony Olekshy
- Re: On the case for exception-based error han... Tony Olekshy
- Re: On the case for exception-based error han... Chaim Frenkel
- Re: On the case for exception-based error... Peter Scott
- Re: On the case for exception-based ... Glenn Linderman
- Re: On the case for exception-based ... Peter Scott
- Re: On the case for exception-based ... Glenn Linderman
- Re: On the case for exception-based ... Peter Scott
- Re: On the case for exception-based error... Glenn Linderman
- Re: On the case for exception-based ... Peter Scott
- Re: On the case for exception-based ... Chaim Frenkel
- Re: On the case for exception-based error handling. Glenn Linderman
