🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

exception class

#2220
From: TECHARCH
Date: Mon, 16 Oct 1995 16:05
57 lines
2553 bytes
I've found in  "The draft standard C++ Library" by PJ Plauger (Prentice Hall,ISBN 0-13-
117003-1, copyright  1995 P.J Plauger) some specification of the Exception class :
	
class exception {
	public:
		typedef void (*raise_handler)(exception&);
		static raise_handler set_raise_handler(raise_handler);
		exception (const char* what_arg=0,
			   const char* where_arg=0,
			   const char* why_arg=0);
		exception (const exception& rhs);
		exception& operator=(const exception& rhs);
		virtual ~exception();
		void raise();
		const char* what() const;
		const char* where() const;
		const char* why() const;
		static void_Throw(exception* rhs);
	
	protected:
		virtual void do_raise();
		exception (const char* what_arg, const char* where_arg,
			    const char* why_arg, _BOOL copyfl);
	
	private:
		void 		_Tidy();
		const char*	_what;
		const char* 	_where;
		const char*	_why;
		_BOOL		_alloced;
		static raise_handler _Handler;
};

But in the "Draft Proposed International Standard for Information Systems Programming
Language C++" (X3J16/95-0087 WG21/N0687 , 28 April 1995) there 's only :

class exception{
	public:
		exception() throw();
		exception& exception(const exception&) throw();
		exception& operator=(const exception&) throw();
		virtual ~exception() throw();
		virtual const char* what() const throw();
};

Is there someone who knows whether the difference comes from a need to simplify this
class?

For instance, there's no more attribute _what, _where, _why, but there's always the what()
accessor, and there are no constructors with a char*.

[ Moderator's note: Plauger's book was written to the March 1994
  version of the draft. Many changes have occurred since then,
  with more library changes yet to come. -sdc ]
[ 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: <techarch.36.00104631@oleane.com>
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamage

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamage
From: techarch@oleane.net (TECHARCH)
Newsgroups: comp.std.c++
Subject: exception class
Date: 16 Oct 1995 16:05:32 GMT
Organization: TECHARCH
Approved: clamage@eng.sun.com (comp.std.c++)
Message-ID: <techarch.36.00104631@oleane.com>
NNTP-Posting-Host: taumet.eng.sun.com
Content-Type: text
Keywords: standard exception
X-Nntp-Posting-Host: intergate.pobox.oleane.com
X-Newsreader: Trumpet for Windows [Version 1.0 Rev A]
Content-Length: 1562
X-Lines: 50
Originator: clamage@taumet