🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Use of standard exception classes

#4011
From: Kevin Cline
Date: Fri, 12 Apr 1996 16:27
35 lines
2142 bytes
In "The Standard C++ Library" on page 65, Plauger wrote:

  "I strongly encourage you to follow the lead of the Standard C++
   library in the use of exceptions:
   * Throw only objects of one or more classes derived from [exception]

Page 19-1 of the 4/95 version of the draft says "The Standard C++
library provides classes to be used to report errors in C++ programs."

But in section 19.1.1 of the same draft it says:

"The class exception defines the base class for the  types  of  objects
 thrown  as  exceptions by *C++ Standard library components*, and certain
 expressions, to report errors detected during program execution."

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?

Is this a problem, or are library functions required to reraise any
exceptions thrown by client code? 

Kevin Cline
---
[ 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: <9604121530.AA08606@sun132.spd.dsccc.com>
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back

Show Full Headers
Complete Article Headers
From: kcline@spdmail.spd.dsccc.com (Kevin Cline)
Message-ID: <9604121530.AA08606@sun132.spd.dsccc.com>
X-Original-Date: Fri, 12 Apr 1996 10:30:42 -0500
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back
Date: 12 Apr 96 16:27:40 GMT
Approved: fjh@cs.mu.oz.au
Organization: -
Newsgroups: comp.std.c++
Subject: Use of standard exception classes
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMW6EheEDnX0m9pzZAQFBywGAmCExNECwEX2UlQ6IGkyGZKrIH8I0o9WM
 6q9D9vxYyPteMAuwubNEit5b21frR7hF
 =yFrV