🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by TECHARCH Mon, 16 Oct 1995 16:05
exception class
#2220
Author: 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. ]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads