Re: On the case for exception-based error handling.
[email protected] (Tony Olekshy) Tue, 22 Aug 2000 16:22:50 -0600
| Newsgroups | perl.perl6.language.errors |
|---|---|
| Organization | Avra Software Lab Inc. |
| Message-ID | <[email protected]> |
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();
> }
Yes.
> 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.
> PS> ***But it's entirely up to each programmer whether or not they use
> PS> Fatal-checking*** This is the Perl way anyway.
>
> Fatal checking, is for core functions. And optional for module authors.
Yes.
> Then Fatal.pm and exception.pm could possibly be consolidated.
Yes.
I like something like this
>
> <chaim>
> --
> Chaim Frenkel Nonlinear Knowledge, Inc.
> [email protected] +1-718-236-0183