Article View: comp.std.c++
Article #2496Re: tree or forest exception hierarchy?
From: J. Kanze
Date: Fri, 10 Nov 1995 19:15
Date: Fri, 10 Nov 1995 19:15
31 lines
2050 bytes
2050 bytes
Raymond Fergerson (rwf@camis.stanford.edu) wrote:
|> My understanding is that the current ANSI draft specifies a
|> number of standard exceptions which form an
|> inheritance forest, but not a tree: there is no common root.
|> I also heard that this choice was the subject of much debate at
|> the meetings. Could someone please present a summary of the
|> arguments both for and against using a tree structure for the
|> standard exception hierarcy. Did Stroustrup express an opinion
|> on this subject, and, if so, which way did he lean? Was multiple
|> inheritance in the use of exceptions the big issue?
As far as I can see, all of the exceptions thrown by the standard
library derive from the class exception, so they form a tree, not a
forest.
This seems logical to me; the isA relationship definitly holds, and
there is a fundamental relationship (as opposed to the case of an Object
class, from which everything derives). I would even suggest that unless
there were very strong motives for doing otherwise, applications base
their exception hierarchy on the one used by the standard library.
--
James Kanze (+33) 88 14 49 00 email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs Bourgeois, 67000 Strasbourg, France
Conseils, études et réalisations en logiciel orienté objet --
-- A la recherche d'une activité dans une region francophone
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<47va08$8lb@gabi.gabi-soft.fr>Path:
arc1-ca.pugleaf.net!128.32.155.1!mattReferences:
<30A0FD4D.D01@camis.stanford.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!128.32.155.1!matt From: kanze@gabi-soft.fr (J. Kanze) Newsgroups: comp.std.c++ Subject: Re: tree or forest exception hierarchy? Date: 10 Nov 1995 19:15:21 GMT Organization: GABI Software, Sarl. Approved: matt@physics2.Berkeley.EDU (Matt Austern) Message-ID: <47va08$8lb@gabi.gabi-soft.fr> References: <30A0FD4D.D01@camis.stanford.edu> NNTP-Posting-Host: physics2.berkeley.edu