Re: Exceptions and Objects

[email protected] ("David L. Nicol") Mon, 14 Aug 2000 22:18:45 -0500
Newsgroups perl.perl6.language.flow
Organization University of Missouri - Kansas City supercomputing infrastructure
Message-ID <[email protected]>
Tony Olekshy wrote:
> 
> Jonathan Scott Duff wrote:
> >  Some people were proposing
> > a try/catch like the following:
> >
> >         try { }
> >         catch SomeException { }
> >         catch SomeOtherException { }
> >         finally { }
> >
> > which seems to only catch exceptions based on name.  




what if they could caught them based on regex match?  That
would be an extremely perl twist to exception handling.  Instead
of writing a (these, except these) syntax into catch/throw, 
catchers could just throw back the ones they didn't want and they'd
procede up the call stack.


I also think we can imply C<try> by the existence of the C<catch> keyword.

The compiler could associate all the catches with the subroutine.





-- 
                          David Nicol 816.235.1187 [email protected]
:wq