sl@0: /* sl@0: * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. sl@0: * sl@0: * Copyright (c) 1996,1997 sl@0: * Silicon Graphics Computer Systems, Inc. sl@0: * sl@0: * Copyright (c) 1999 sl@0: * Boris Fomitchev sl@0: * sl@0: * This material is provided "as is", with absolutely no warranty expressed sl@0: * or implied. Any use is at your own risk. sl@0: * sl@0: * Permission to use or copy this software for any purpose is hereby granted sl@0: * without fee, provided the above notices are retained on all copies. sl@0: * Permission to modify the code and to distribute modified code is granted, sl@0: * provided the above notices are retained, and a notice that the code was sl@0: * modified is included with the above copyright notice. sl@0: * sl@0: */ sl@0: sl@0: sl@0: # if !defined (_STLP_OUTERMOST_HEADER_ID) sl@0: # define _STLP_OUTERMOST_HEADER_ID 0x63 sl@0: # include sl@0: # elif (_STLP_OUTERMOST_HEADER_ID == 0x63) && ! defined (_STLP_DONT_POP_0x63) sl@0: # define _STLP_DONT_POP_0x63 sl@0: # endif sl@0: sl@0: #ifndef _STLP_STDEXCEPT sl@0: #define _STLP_STDEXCEPT 1 sl@0: sl@0: # ifdef _STLP_PRAGMA_ONCE sl@0: # pragma once sl@0: # endif sl@0: sl@0: #if defined (_STLP_USE_TRAP_LEAVE) sl@0: sl@0: enum { sl@0: STDEX_bad_alloc = -10000, sl@0: STDEX_logic_error = -10001, sl@0: STDEX_runtime_error = -10002, sl@0: STDEX_domain_error = -10003, sl@0: STDEX_invalid_argument = -10004, sl@0: STDEX_length_error = -10005, sl@0: STDEX_out_of_range = -10006, sl@0: STDEX_range_error = -10007, sl@0: STDEX_overflow_error = -10008, sl@0: STDEX_underflow_error = -10009 sl@0: }; sl@0: sl@0: // User may override this sl@0: #ifndef STDEX_REPORT_EXCEPTION sl@0: # define STDEX_REPORT_EXCEPTION(x) sl@0: #endif sl@0: sl@0: #endif sl@0: sl@0: # if !defined(_STLP_STDEXCEPT_SEEN) && \ sl@0: (!defined (_STLP_USE_NATIVE_STDEXCEPT) || defined (_STLP_USE_OWN_NAMESPACE)) sl@0: sl@0: # define _STLP_STDEXCEPT_SEEN 1 sl@0: sl@0: # include sl@0: sl@0: #if defined(_STLP_USE_EXCEPTIONS) || \ sl@0: !(defined(_MIPS_SIM) && defined(_ABIO32) && _MIPS_SIM == _ABIO32) sl@0: sl@0: # include sl@0: sl@0: #ifndef _STLP_INTERNAL_ALLOC_H sl@0: # include sl@0: #endif sl@0: sl@0: #ifndef _STLP_STRING_FWD_H sl@0: # include sl@0: #endif sl@0: sl@0: # define _STLP_OWN_STDEXCEPT 1 sl@0: sl@0: _STLP_BEGIN_NAMESPACE sl@0: sl@0: # if ! defined (_STLP_NO_EXCEPTION_HEADER) sl@0: # if !defined(_STLP_EXCEPTION_BASE) && !defined(_STLP_BROKEN_EXCEPTION_CLASS) && defined (_STLP_USE_NAMESPACES) && defined (_STLP_USE_OWN_NAMESPACE) sl@0: using _STLP_VENDOR_EXCEPT_STD::exception; sl@0: # endif sl@0: # endif sl@0: # define _STLP_EXCEPTION_BASE exception sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: class __Named_exception : public _STLP_EXCEPTION_BASE { sl@0: #else sl@0: class _STLP_CLASS_DECLSPEC __Named_exception : public _STLP_EXCEPTION_BASE { sl@0: #endif //__SYMBIAN32__ sl@0: public: sl@0: _STLP_DECLSPEC __Named_exception(const string& __str) sl@0: # ifdef _STLP_OWN_IOSTREAMS sl@0: ; sl@0: _STLP_DECLSPEC const char* what() const _STLP_NOTHROW_INHERENTLY; sl@0: _STLP_DECLSPEC ~__Named_exception() _STLP_NOTHROW_INHERENTLY; sl@0: # else sl@0: { sl@0: strncpy(_M_name, __get_c_string(__str), _S_bufsize); sl@0: _M_name[_S_bufsize - 1] = '\0'; sl@0: } sl@0: const char* what() const _STLP_NOTHROW_INHERENTLY { return _M_name; } sl@0: # endif sl@0: sl@0: private: sl@0: enum { _S_bufsize = 256 }; sl@0: char _M_name[_S_bufsize]; sl@0: }; sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: class logic_error : public __Named_exception { sl@0: #else sl@0: class _STLP_CLASS_DECLSPEC logic_error : public __Named_exception { sl@0: #endif sl@0: public: sl@0: _STLP_DECLSPEC logic_error(const string& __s) sl@0: #ifdef __SYMBIAN32__ sl@0: ; sl@0: #else sl@0: : __Named_exception(__s) {} sl@0: #endif sl@0: # ifdef _STLP_OWN_IOSTREAMS sl@0: _STLP_DECLSPEC ~logic_error() _STLP_NOTHROW_INHERENTLY; sl@0: # endif sl@0: }; sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: class runtime_error : public __Named_exception { sl@0: #else sl@0: class _STLP_CLASS_DECLSPEC runtime_error : public __Named_exception { sl@0: #endif sl@0: public: sl@0: _STLP_DECLSPEC runtime_error(const string& __s) sl@0: #ifdef __SYMBIAN32__ sl@0: ; sl@0: #else sl@0: : __Named_exception(__s) {} sl@0: #endif sl@0: # ifdef _STLP_OWN_IOSTREAMS sl@0: _STLP_DECLSPEC ~runtime_error() _STLP_NOTHROW_INHERENTLY; sl@0: # endif sl@0: }; sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: class domain_error : public logic_error { sl@0: #else sl@0: class _STLP_CLASS_DECLSPEC domain_error : public logic_error { sl@0: #endif sl@0: public: sl@0: _STLP_DECLSPEC domain_error(const string& __arg) sl@0: #ifdef __SYMBIAN32__ sl@0: ; sl@0: #else sl@0: : logic_error(__arg) {} sl@0: #endif sl@0: # ifdef _STLP_OWN_IOSTREAMS sl@0: _STLP_DECLSPEC ~domain_error() _STLP_NOTHROW_INHERENTLY; sl@0: # endif sl@0: }; sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: class invalid_argument : public logic_error { sl@0: #else sl@0: class _STLP_CLASS_DECLSPEC invalid_argument : public logic_error { sl@0: #endif sl@0: public: sl@0: _STLP_DECLSPEC invalid_argument(const string& __arg) sl@0: #ifdef __SYMBIAN32__ sl@0: ; sl@0: #else sl@0: : logic_error(__arg) {} sl@0: #endif sl@0: # ifdef _STLP_OWN_IOSTREAMS sl@0: _STLP_DECLSPEC ~invalid_argument() _STLP_NOTHROW_INHERENTLY; sl@0: # endif sl@0: }; sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: class length_error : public logic_error { sl@0: #else sl@0: class _STLP_CLASS_DECLSPEC length_error : public logic_error { sl@0: #endif sl@0: public: sl@0: _STLP_DECLSPEC length_error(const string& __arg) sl@0: #ifdef __SYMBIAN32__ sl@0: ; sl@0: #else sl@0: : logic_error(__arg) {} sl@0: #endif sl@0: # ifdef _STLP_OWN_IOSTREAMS sl@0: _STLP_DECLSPEC ~length_error() _STLP_NOTHROW_INHERENTLY; sl@0: # endif sl@0: }; sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: class out_of_range : public logic_error { sl@0: #else sl@0: class _STLP_CLASS_DECLSPEC out_of_range : public logic_error { sl@0: #endif sl@0: public: sl@0: _STLP_DECLSPEC out_of_range(const string& __arg) sl@0: #ifdef __SYMBIAN32__ sl@0: ; sl@0: #else sl@0: : logic_error(__arg) {} sl@0: #endif sl@0: # ifdef _STLP_OWN_IOSTREAMS sl@0: _STLP_DECLSPEC ~out_of_range() _STLP_NOTHROW_INHERENTLY; sl@0: # endif sl@0: }; sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: class range_error : public runtime_error { sl@0: #else sl@0: class _STLP_CLASS_DECLSPEC range_error : public runtime_error { sl@0: #endif sl@0: public: sl@0: _STLP_DECLSPEC range_error(const string& __arg) sl@0: #ifdef __SYMBIAN32__ sl@0: ; sl@0: #else sl@0: : runtime_error(__arg) {} sl@0: #endif sl@0: # ifdef _STLP_OWN_IOSTREAMS sl@0: _STLP_DECLSPEC ~range_error() _STLP_NOTHROW_INHERENTLY; sl@0: # endif sl@0: }; sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: class overflow_error : public runtime_error { sl@0: #else sl@0: class _STLP_CLASS_DECLSPEC overflow_error : public runtime_error { sl@0: #endif sl@0: public: sl@0: _STLP_DECLSPEC overflow_error(const string& __arg) sl@0: #ifdef __SYMBIAN32__ sl@0: ; sl@0: #else sl@0: : runtime_error(__arg) {} sl@0: #endif sl@0: # ifdef _STLP_OWN_IOSTREAMS sl@0: _STLP_DECLSPEC ~overflow_error() _STLP_NOTHROW_INHERENTLY; sl@0: # endif sl@0: }; sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: class underflow_error : public runtime_error { sl@0: #else sl@0: class _STLP_CLASS_DECLSPEC underflow_error : public runtime_error { sl@0: #endif sl@0: public: sl@0: _STLP_DECLSPEC underflow_error(const string& __arg) sl@0: #ifdef __SYMBIAN32__ sl@0: ; sl@0: #else sl@0: : runtime_error(__arg) {} sl@0: #endif sl@0: # ifdef _STLP_OWN_IOSTREAMS sl@0: _STLP_DECLSPEC ~underflow_error() _STLP_NOTHROW_INHERENTLY; sl@0: # endif sl@0: }; sl@0: sl@0: _STLP_END_NAMESPACE sl@0: sl@0: #endif /* Not o32, and no exceptions */ sl@0: # endif /* _STLP_STDEXCEPT_SEEN */ sl@0: sl@0: sl@0: #if defined (_STLP_USE_NATIVE_STDEXCEPT) sl@0: # include _STLP_NATIVE_HEADER(stdexcept) sl@0: # endif sl@0: sl@0: #endif /* _STLP_STDEXCEPT */ sl@0: sl@0: # if (_STLP_OUTERMOST_HEADER_ID == 0x63) sl@0: # if ! defined (_STLP_DONT_POP_0x63) sl@0: # include sl@0: # undef _STLP_OUTERMOST_HEADER_ID sl@0: # endif sl@0: # undef _STLP_DONT_POP_0x63 sl@0: # endif sl@0: sl@0: sl@0: // Local Variables: sl@0: // mode:C++ sl@0: // End: sl@0: