On Mon, Aug 14, 2000 at 04:16:42AM -0600, Tony Olekshy wrote:
> Peter Scott wrote:
> >
> > David L. Nicol wrote:
> >
> > >Further discussion in the thread discussed the idea of returning
> > >to the point of throwing, as the routine noting the error might
> > >be supposed to ignore this error, the author of this comment
> > >(Bennett Todd?) implied that that is how throwing and catching
> > >is supposed to work.
> >
> > I disagree. It should never be possible to ignore an exception,
> > except by making it painfully obvious:
> >
> > try {
> > # fragile code which doesn't call any subroutines that might die
> > # and doesn't include any other try blocks
> > } catch {
> > # No code at all
> > }
>
> I agree with Peter: use a try with an empty catch.
That depends on how you think about things.
Many people seem to be coming from the though of "I want to
catch these exceptions" where-as the current perl-like way
to do this is "I want to see what exceptions were thrown and
deal with them"
In the first scenario an exception would look for a try that
explicitly states it cathes it. In the second an exception
will only go as far as the firt try{} on the stack and it is
upto that code to re-throw it.
IMO, I prefer the second one although I could live with the first.
This difference should be listed in the RFC to allow Larry to
make his decision of which he wants.
Graham.