On Monday, March 05, 2012 15:05:57 Nick Sabalausky wrote:
> "Walter Bright" <newshou...@digitalmars.com> wrote in message
> news:jiunst$qrm$1...@digitalmars.com...
> 
> > 3. Intercepting and recovering from seg faults, div by 0, etc., all sounds
> > great on paper. In practice, it is almost always wrong. The only exception
> > (!) to the rule is when sandboxing a plugin (as you suggested).
> 
> The purpose of catching exceptions is to respond to a condition. Recovery is
> merely *one* such type of response.

If a segfault were turned into an exception of some kind, then it would 
definitely need to be an Error like AssertError or OutOfMemoryError, not a type 
derived from Exception. And I'd argue that a NullPointerException should 
really be a NullPointerError if such is ever added.

- Jonathan M Davis

Reply via email to