🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #4037

Re: Use of standard exception classes

#4037
From: Bob Friesenhahn
Date: Mon, 15 Apr 1996 07:20
38 lines
2379 bytes
Kevin Cline wrote:

> Can someone on the committee indicate whether it was the committee's
> intention for the standard exception class hierarchy to be used in
> general C++ programming, or whether the intention was for the standard
> exception class hierarchy to be reserved to the Standard C++ library?
> 
> Another developer on our team has asked
>   How can we be sure that ANSI C++ library callbacks work
>   correctly in the face of exceptions?  What if ANSI C++
>   library code catches *our* exception?

A further consideration is that often it is valuable to know what
body of code generated an exception.  If all exeptions are derived
from the same base class, then it will be impossible to tell if
an exception occurred in standard library code, user code, or some
third party library. An additional level of derivation could be
used to satisfy this requirement, but since the standard exception
classes have already been defined, there is no satisfactory place
to insert the additional derivation.

By using a different base class for each seperately maintained body
of code, it will be possible to provide handlers for each code body
with the additional maintenance expense of maintaining the additional
catch blocks.

Bob
-- 
Bob Friesenhahn
bfriesen@cyberramp.net (Home)
thefuzz@bix.com        (On BIX)
http://www.cyberramp.net/~bfriesen
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
Technical Details
Message-ID: <3171C842.64BB@cyberramp.net>
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
References: <9604121530.AA08606@sun132.spd.dsccc.com>

Show Full Headers
Complete Article Headers
From: Bob Friesenhahn <bfriesen@cyberramp.net>
Message-ID: <3171C842.64BB@cyberramp.net>
X-Original-Date: Sun, 14 Apr 1996 22:53:38 -0500
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
Date: 15 Apr 96 07:20:36 GMT
Approved: fjh@cs.mu.oz.au
Newsgroups: comp.std.c++
Subject: Re: Use of standard exception classes
Organization: Simple Systems
References: <9604121530.AA08606@sun132.spd.dsccc.com>
X-Mailer: Mozilla 2.01 (X11; I; SunOS 5.5 sun4m)
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMXH45eEDnX0m9pzZAQFXVAF8DhQzvoP7Nv5+oRtfnSnIwU7y3cGzvGjg
 aEBeCcrVz4CqgxT1XQFmsZXeFDDV0RS5
 =rgQT