Re: errors and their keywords and where catch can return to and stuff like that
[email protected] (Chaim Frenkel) 14 Aug 2000 21:55:30 -0400
| Newsgroups | perl.perl6.language.flow |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "JM" == James Mastros <[email protected]> writes: JM> 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 JM> Except that makes the decision the thrower's, rather then the [non-]catcher's. Err, what catcher? You just wanted _non_catching to be handled. And if you want to still point to someone block isn't catching it, which block between the thrower and main? JM> For example, "use warnings 'none'" could become JM> "$Exception::warnings::uncaught_handler = undef" under my proposal, but JM> isn't doable under yours. Basicly, my idea would let you specify exception JM> handlers, or use try{}catch{} (-ish) structures, giving try/catch first JM> chance. And which module would set it? The old global issue. What about threads? What about all the other modules sitting between main and the thrower? The only valid use I see is by main, anything else should be localized. <chaim> -- Chaim Frenkel Nonlinear Knowledge, Inc. [email protected] +1-718-236-0183