try...catch slooowness?

Rob rob2970 at yah00.com
Tue Dec 21 14:25:09 PST 2010


Steven Schveighoffer wrote:

> An exception is a recoverable error,

Not necessarily. At some point, all the handling options could have been 
tried but all failed in which case there is nothing left to do except for 
letting something higher up (like the operating system) deal with the 
situation. In such a case, recovery did not occur if you consider 
recovery to mean that the program keeps running normally.

> Exception handling is
> great when it exists at a much higher level, because you can
> essentially do all error handling in one spot, and simply write code
> without worrying about error codes.

That sounds like the common misconception that leads to weak designs.





More information about the Digitalmars-d mailing list