williamr@4: /* williamr@4: * Copyright (c) 1996,1997 williamr@4: * Silicon Graphics Computer Systems, Inc. williamr@4: * williamr@4: * Copyright (c) 1999 williamr@4: * Boris Fomitchev williamr@4: * williamr@4: * This material is provided "as is", with absolutely no warranty expressed williamr@4: * or implied. Any use is at your own risk. williamr@4: * williamr@4: * Permission to use or copy this software for any purpose is hereby granted williamr@4: * without fee, provided the above notices are retained on all copies. williamr@4: * Permission to modify the code and to distribute modified code is granted, williamr@4: * provided the above notices are retained, and a notice that the code was williamr@4: * modified is included with the above copyright notice. williamr@4: * williamr@4: */ williamr@4: williamr@4: #ifndef _STLP_INTERNAL_STDEXCEPT williamr@4: #define _STLP_INTERNAL_STDEXCEPT williamr@4: williamr@4: #ifndef _STLP_INTERNAL_STDEXCEPT_BASE williamr@4: # include williamr@4: #endif williamr@4: williamr@4: #if !defined (_STLP_USE_NATIVE_STDEXCEPT) || defined (_STLP_USE_OWN_NAMESPACE) williamr@4: williamr@4: # if defined(_STLP_USE_EXCEPTIONS) || \ williamr@4: !(defined(_MIPS_SIM) && defined(_ABIO32) && (_MIPS_SIM == _ABIO32)) williamr@4: williamr@4: _STLP_BEGIN_NAMESPACE williamr@4: williamr@4: class _STLP_CLASS_DECLSPEC logic_error : public __Named_exception { williamr@4: public: williamr@4: logic_error(const string& __s) : __Named_exception(__s) {} williamr@4: # ifndef _STLP_USE_NO_IOSTREAMS williamr@4: ~logic_error() _STLP_NOTHROW_INHERENTLY; williamr@4: # endif williamr@4: }; williamr@4: williamr@4: class _STLP_CLASS_DECLSPEC runtime_error : public __Named_exception { williamr@4: public: williamr@4: runtime_error(const string& __s) : __Named_exception(__s) {} williamr@4: # ifndef _STLP_USE_NO_IOSTREAMS williamr@4: ~runtime_error() _STLP_NOTHROW_INHERENTLY; williamr@4: # endif williamr@4: }; williamr@4: williamr@4: class _STLP_CLASS_DECLSPEC domain_error : public logic_error { williamr@4: public: williamr@4: domain_error(const string& __arg) : logic_error(__arg) {} williamr@4: # ifndef _STLP_USE_NO_IOSTREAMS williamr@4: ~domain_error() _STLP_NOTHROW_INHERENTLY; williamr@4: # endif williamr@4: }; williamr@4: williamr@4: class _STLP_CLASS_DECLSPEC invalid_argument : public logic_error { williamr@4: public: williamr@4: invalid_argument(const string& __arg) : logic_error(__arg) {} williamr@4: # ifndef _STLP_USE_NO_IOSTREAMS williamr@4: ~invalid_argument() _STLP_NOTHROW_INHERENTLY; williamr@4: # endif williamr@4: }; williamr@4: williamr@4: class _STLP_CLASS_DECLSPEC length_error : public logic_error { williamr@4: public: williamr@4: length_error(const string& __arg) : logic_error(__arg) {} williamr@4: # ifndef _STLP_USE_NO_IOSTREAMS williamr@4: ~length_error() _STLP_NOTHROW_INHERENTLY; williamr@4: # endif williamr@4: }; williamr@4: williamr@4: class _STLP_CLASS_DECLSPEC out_of_range : public logic_error { williamr@4: public: williamr@4: out_of_range(const string& __arg) : logic_error(__arg) {} williamr@4: # ifndef _STLP_USE_NO_IOSTREAMS williamr@4: ~out_of_range() _STLP_NOTHROW_INHERENTLY; williamr@4: # endif williamr@4: }; williamr@4: williamr@4: class _STLP_CLASS_DECLSPEC range_error : public runtime_error { williamr@4: public: williamr@4: range_error(const string& __arg) : runtime_error(__arg) {} williamr@4: # ifndef _STLP_USE_NO_IOSTREAMS williamr@4: ~range_error() _STLP_NOTHROW_INHERENTLY; williamr@4: # endif williamr@4: }; williamr@4: williamr@4: class _STLP_CLASS_DECLSPEC overflow_error : public runtime_error { williamr@4: public: williamr@4: overflow_error(const string& __arg) : runtime_error(__arg) {} williamr@4: # ifndef _STLP_USE_NO_IOSTREAMS williamr@4: ~overflow_error() _STLP_NOTHROW_INHERENTLY; williamr@4: # endif williamr@4: }; williamr@4: williamr@4: class _STLP_CLASS_DECLSPEC underflow_error : public runtime_error { williamr@4: public: williamr@4: underflow_error(const string& __arg) : runtime_error(__arg) {} williamr@4: # ifndef _STLP_USE_NO_IOSTREAMS williamr@4: ~underflow_error() _STLP_NOTHROW_INHERENTLY; williamr@4: # endif williamr@4: }; williamr@4: williamr@4: _STLP_END_NAMESPACE williamr@4: williamr@4: # endif williamr@4: #endif williamr@4: williamr@4: #endif /* _STLP_INTERNAL_STDEXCEPT */