// stdexcept standard header
#ifndef _STDEXCEPT_
#define _STDEXCEPT_

#pragma info(none)
#ifndef __CHKHDR__
#  pragma report(level, E)
#endif
#pragma info(restore)

#if __IBMCPP__ < 400
#error This file to be used only with IBM VisualAge C++ v4 and later compilers.
#endif /* __IBMCPP__ */

#pragma namemangling(ansi)

   /********************************************************************/
   /*  <stdexcept> header file                                         */
   /*                                                                  */
   /*  VisualAge C++, Version 4.0                                      */
   /*    Licensed Material - Property of IBM                           */
   /*                                                                  */
   /*  5801-AAR and Other Materials                                    */
   /*                                                                  */
   /*  (c) Copyright IBM Corp 1991, 1998. All rights reserved.         */
   /*                                                                  */
   /*                                                                  */
   /*  Licensed Materials.                                             */
   /*                                                                  */
   /*  Dinkum C++ Library                                              */
   /*  Copyright (c) 1998.  Licensed to IBM Corp. and its suppliers.   */
   /*                                                                  */
   /********************************************************************/

#include <exception>
#include <xstring>
_STD_BEGIN
		// CLASS logic_error
class logic_error : public exception {
public:
	explicit logic_error(const string& _S)
		: exception("logic error"), _Str(_S) {}
	virtual ~logic_error()
		{}
	virtual const char *what() const _THROW0()
		{return (_Str.c_str()); }
protected:
	virtual void _Doraise() const
		{_RAISE(*this); }
private:
	string _Str;
	};
		// CLASS domain_error
class domain_error : public logic_error {
public:
	explicit domain_error(const string& _S)
		: logic_error(_S) {}
	virtual ~domain_error()
		{}
protected:
	virtual void _Doraise() const
		{_RAISE(*this); }
	};
		// CLASS invalid_argument
class invalid_argument : public logic_error {
public:
	explicit invalid_argument(const string& _S)
		: logic_error(_S) {}
	virtual ~invalid_argument()
		{}
protected:
	virtual void _Doraise() const
		{_RAISE(*this); }
	};
		// CLASS length_error
class length_error : public logic_error {
public:
	explicit length_error(const string& _S)
		: logic_error(_S) {}
	virtual ~length_error()
		{}
protected:
	virtual void _Doraise() const
		{_RAISE(*this); }
	};
		// CLASS out_of_range
class out_of_range : public logic_error {
public:
	explicit out_of_range(const string& _S)
		: logic_error(_S) {}
	virtual ~out_of_range()
		{}
protected:
	virtual void _Doraise() const
		{_RAISE(*this); }
	};
		// CLASS runtime_error
class runtime_error : public exception {
public:
	explicit runtime_error(const string& _S)
		: exception("runtime error"), _Str(_S) {}
	virtual ~runtime_error()
		{}
	virtual const char *what() const _THROW0()
		{return (_Str.c_str()); }
protected:
	virtual void _Doraise() const
		{_RAISE(*this); }
private:
	string _Str;
	};
		// CLASS overflow_error
class overflow_error : public runtime_error {
public:
	explicit overflow_error(const string& _S)
		: runtime_error(_S) {}
	virtual ~overflow_error()
		{}
protected:
	virtual void _Doraise() const
		{_RAISE(*this); }
	};
		// CLASS underflow_error
class underflow_error : public runtime_error {
public:
	explicit underflow_error(const string& _S)
		: runtime_error(_S) {}
	virtual ~underflow_error()
		{}
protected:
	virtual void _Doraise() const
		{_RAISE(*this); }
	};
		// CLASS range_error
class range_error : public runtime_error {
public:
	explicit range_error(const string& _S)
		: runtime_error(_S) {}
	virtual ~range_error()
		{}
protected:
	virtual void _Doraise() const
		{_RAISE(*this); }
	};
_STD_END

#pragma namemangling()

#pragma info(none)
#ifndef __CHKHDR__
#  pragma report(pop)
#endif
#pragma info(restore)

#endif /* _STDEXCEPT_ */

/*
 * Copyright (c) 1994 by P.J. Plauger.  ALL RIGHTS RESERVED. 
 * Consult your license regarding permissions and restrictions.
V2.2:0081 */
