Q: Exception design questions

Daniel Keep daniel.keep.lists at gmail.com
Sat Jun 16 05:42:09 PDT 2007


> Can anyone point me to Walter's design explanation for how Error and
> Exception are supposed to be structured. I'm guessing that Walter
> intends Errors to be more generic (problem domain rather than individual
> problem) and that Exception to be very specific to the exact problem.

http://www.digitalmars.com/d/phobos/object.html

Error's are for unrecoverable errors (like running out of memory) and
Exceptions are for recoverable ones.

The sad thing is that Error derives from Exception, which means it's
impossible to write a catch statement just for recoverable errors.
You'd have to write one for Error that re-throws the exception, then a
later one for Exceptions.


	-- Daniel



More information about the Digitalmars-d mailing list