At 11:58 PM 8/22/00 +0200, Markus Peter wrote:
>On Tue, 22 Aug 2000, Glenn Linderman wrote:
> > > throw an exception as a means of reporting "file is not there anyway" -
> > > which I absolutely do not care about...
> >
> > Well, if they die on you, there's not much you can do about it.  But if 
> they throw
> > an exception, you will only die if you don't catch it.
>
>With "die on me" I meant not usage of "die" but throwing exceptions I do
>not care about catching...

Right.  "die" and "throw" will be virtually synonymous.  We might reserve 
the term "die" to mean "an exception that nothing catches," but until 
everyone understands that, there will be confusion.  In particular, code 
may call C<die> and yet not cause program death, because a try/catch block 
was set up to handle it.  Even if the author of the C<die> wasn't 
anticipating that.

>I spoke about propagation to the top-most level - which is the interpreter
>- which is another way of speaking about uncaught exceptions in most
>languages.

Top-most level in this case means the innermost lexical scope that has no 
try/catch block around the code throwing up.  I think.  Either way, no need 
to bring the interpreter into it.

>Hmm... guess I could have had this explained a lot faster - what I
>actually want is: I want to handle exceptions only if I'm in the mood to.
>
>Example (for those who could still not see any sense in my words ;-):
>
>use no fatal;
>
>bla;
>....
>bla;
>
># should any of the above code throw an exception it gets ignored
>
>try {
># from this point on i handle exceptions - use fatal is implied
>   foo;
>} catch ...; # handle exception
>
>bar;
>...
>bar;
># exceptions automatically ignored again

I'm not crazy about the implicit use fatal.  Particularly since there will 
be nuances and all-or-nothing may not make sense.

--
Peter Scott
Pacific Systems Design Technologies

Reply via email to