//  exception : headerfile for the free standard C++ library
//  
//  Copyright (C) 1999 by the free standard C++ Library Team
//                        see AUTHORS for more details
//
//  Homepage : http://www.inf.fu-berlin.de/~mkrueger/fscl/
//
//  This library is free software; you can redistribute it and/or
//  modify it under the terms of the GNU Library General Public
//  License as published by the Free Software Foundation; either	
//  version 2 of the License, or (at your option) any later version.
//
//  This library is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//  Library General Public License for more details.
//  You should have received a copy of the GNU Library General Public
//  License along with this library; if not, write to the Free
//  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
//  version : 0.1 last modified : 17.09.99
//
//  should be iso14882 conform
//

#ifndef __CPP_EXCEPTION
#define __CPP_EXCEPTION

#include<cstddef>
#include<new>


namespace std {
	
	class exception
	{
		public:
			exception() throw()
			{
			}
			exception(const exception &ex) throw()
			{
			}
			exception& operator=(const exception& ex) throw()
			{
				return *this;
			}
			virtual ~exception() throw()
			{
			}
			virtual const char* what() const throw()
			{
				return 0;
			}
			
	};
	
	class bad_exception : public exception
	{
		public:
			bad_exception() throw()
			{
			}
			bad_exception(const bad_exception& bex) throw()
			{
			}
			bad_exception& operator=(const bad_exception& bex) throw()
			{
				return *this;
			}
			virtual ~bad_exception() throw()
			{
			}
			
	};
	
	typedef void (*unexpected_handler)();
	typedef void (*terminate_handler)();

	unexpected_handler set_unexpected(unexpected_handler f) throw();
	terminate_handler set_terminate(terminate_handler f) throw();

	void unexpected();
	void terminate();
	bool uncaught_exception();

}

#endif
