Article View: comp.std.c++
Article #3974Re: Must exception classes have copy const
From: Steve Clamage
Date: Tue, 09 Apr 1996 20:01
Date: Tue, 09 Apr 1996 20:01
42 lines
2627 bytes
2627 bytes
In article 347@dub-news-svc-5.compuserve.com, Philippe Verdy <100105.3120@compuserve.com> writes: > >The reason why I am putting this submission is that I don't >know why this scheme does not allow resumable exceptions: Whether exceptions should be resumable was the subject of intense debate over a period of two years early in the life of the C++ Committee. The debate was not about how to implement them. The debate was about whether the resumable model was appropriate for C++. The short answer is that resumable exceptions impose a much higher cost on all implementations and programs, even those that don't want resumable exceptions, and that although sometimes you do want to resume an exception, such cases are in practice rare. People with extensive experience with resumable exceptions came to believe over time that they were a mistake, and that you get better program designs if you don't use them. You can simulate resumable exceptions with non-resumable exceptions if you need to, so only convenience and not functionality is lost by the adopted language rule. Debugging is a special case. In debug mode, you want to halt at the throw point, not the catch point after the stack has been unwound. A reasonable debugger will let you halt at the throw point. Whether an uncaught exception is detected before or after stack unwinding is up to the implementation. The implementation can choose to provide a core dump or other diagnostic information as of the point of the uncaught throw, for example, and reasonable implementations will make that choice available. --- Steve Clamage, stephen.clamage@eng.sun.com [ 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:
<4kef9s$ivf@engnews1.Eng.Sun.COM>Path:
arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamageReferences:
<4kca45$347@dub-news-svc-5.compuserve.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage From: clamage@Eng.sun.com (Steve Clamage) Newsgroups: comp.std.c++ Subject: Re: Must exception classes have copy const Date: 9 Apr 1996 20:01:52 GMT Organization: Sun Microsystems Inc. Approved: clamage@eng.sun.com (comp.std.c++) Message-ID: <4kef9s$ivf@engnews1.Eng.Sun.COM> References: <4kca45$347@dub-news-svc-5.compuserve.com> Reply-To: clamage@Eng.sun.com NNTP-Posting-Host: taumet.eng.sun.com X-Nntp-Posting-Host: taumet.eng.sun.com Content-Length: 1630 X-Lines: 35 Originator: clamage@taumet