Topic: Re:Exceptions: Are they a Bad Thing?


Author: stan@mayo.edu (Andrew Staniszewski)
Date: 6 Jan 1994 14:07:54 GMT
Raw View
I found your article very entertaining, and agree that exceptions have limited
uses. In c++, one large area in errors caused in the ctor, and it is the ONLY
way provided to handle non-fatal errors in the ctor. Other areas are for
errors in operators, where it is not possible to return status information.
In both of these cases, it is practicle to expect that an exception handler will
be provided in an appropriate place, and that if one is not provided,
termination IS appropriate. The ansi committie does need to address:

 Minimum infromation being Required in an exception, by requiring
 all exceptions to derived from a specific base class which contains
 a message field and probably stack trace information.

 Possibly, limiting exception use to operators and ctor/dtors.


I whole heartedly agree that uninformed use of exceptions is a problems,
but they do have thier uses in c++. The fact that their use should be limited
is something that an experience company/group should handle by the way of a
set of well written standards, practicies and proceedures for software
development.

--
------------------------------------------------------------------------------
Andrew Staniszewski
staniszewski@mayo.edu
------------------------------------------------------------------------------