Re: errors and their keywords and where catch can return to and stuff like that
[email protected] (James Mastros) Mon, 14 Aug 2000 19:22:26 -0400
| Newsgroups | perl.perl6.language.flow |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Aug 14, 2000 at 06:17:02PM -0400, Chaim Frenkel wrote:
> 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
Except that makes the decision the thrower's, rather then the [non-]catcher's.
For example, "use warnings 'none'" could become
"$Exception::warnings::uncaught_handler = undef" under my proposal, but
isn't doable under yours. Basicly, my idea would let you specify exception
handlers, or use try{}catch{} (-ish) structures, giving try/catch first
chance.
-=- James Mastros