diff -r e1b950c65cb4 -r 837f303aceeb epoc32/include/stdapis/stlportv5/stl/_range_errors.h --- a/epoc32/include/stdapis/stlportv5/stl/_range_errors.h Wed Mar 31 12:27:01 2010 +0100 +++ b/epoc32/include/stdapis/stlportv5/stl/_range_errors.h Wed Mar 31 12:33:34 2010 +0100 @@ -21,82 +21,77 @@ // _STLP_DONT_THROW_RANGE_ERRORS is a hook so that users can disable // this exception throwing. -#if defined(_STLP_CAN_THROW_RANGE_ERRORS) && defined(_STLP_USE_EXCEPTIONS) \ - && !defined(_STLP_DONT_THROW_RANGE_ERRORS) -# define _STLP_THROW_RANGE_ERRORS +#if defined (_STLP_CAN_THROW_RANGE_ERRORS) && defined (_STLP_USE_EXCEPTIONS) && \ + !defined (_STLP_DONT_THROW_RANGE_ERRORS) +# define _STLP_THROW_RANGE_ERRORS #endif // For the STLport iostreams, only declaration here, definition is in the lib - -#if defined ( _STLP_OWN_IOSTREAMS ) && ! defined (_STLP_EXTERN_RANGE_ERRORS) +#if !defined (_STLP_USE_NO_IOSTREAMS) && !defined (_STLP_EXTERN_RANGE_ERRORS) # define _STLP_EXTERN_RANGE_ERRORS -# endif - -#if defined (_STLP_EXTERN_RANGE_ERRORS) -# ifndef _STLP_STDEXCEPT -# include -# endif -_STLP_BEGIN_NAMESPACE -void _STLP_DECLSPEC _STLP_CALL __stl_throw_range_error(const char* __msg); -void _STLP_DECLSPEC _STLP_CALL __stl_throw_out_of_range(const char* __msg); -void _STLP_DECLSPEC _STLP_CALL __stl_throw_length_error(const char* __msg); -void _STLP_DECLSPEC _STLP_CALL __stl_throw_invalid_argument(const char* __msg); -void _STLP_DECLSPEC _STLP_CALL __stl_throw_overflow_error(const char* __msg); -_STLP_END_NAMESPACE -#else - -#if defined(_STLP_THROW_RANGE_ERRORS) -# ifndef _STLP_STDEXCEPT -# include -# endif -# ifndef _STLP_STRING -# include -# endif -# define _STLP_THROW_MSG(ex,msg) throw ex(string(msg)) -#else -# if defined (_STLP_WINCE) -# define _STLP_THROW_MSG(ex,msg) TerminateProcess(GetCurrentProcess(), 0) -# else -# include -# include -# ifdef _STLP_USE_TRAP_LEAVE -# define _STLP_THROW_MSG(ex,msg) { STDEX_REPORT_EXCEPTION(msg) ; User::Leave(STDEX_##ex); } -# include -# else -# define _STLP_THROW_MSG(ex,msg) puts(msg),_STLP_ABORT() -# endif -# endif #endif -// For wrapper mode and throwing range errors, include the +_STLP_BEGIN_NAMESPACE +void _STLP_FUNCTION_THROWS _STLP_DECLSPEC _STLP_CALL __stl_throw_runtime_error(const char* __msg); +void _STLP_FUNCTION_THROWS _STLP_DECLSPEC _STLP_CALL __stl_throw_range_error(const char* __msg); +void _STLP_FUNCTION_THROWS _STLP_DECLSPEC _STLP_CALL __stl_throw_out_of_range(const char* __msg); +void _STLP_FUNCTION_THROWS _STLP_DECLSPEC _STLP_CALL __stl_throw_length_error(const char* __msg); +void _STLP_FUNCTION_THROWS _STLP_DECLSPEC _STLP_CALL __stl_throw_invalid_argument(const char* __msg); +void _STLP_FUNCTION_THROWS _STLP_DECLSPEC _STLP_CALL __stl_throw_overflow_error(const char* __msg); +_STLP_END_NAMESPACE + +#if !defined (_STLP_EXTERN_RANGE_ERRORS) + +# if defined(_STLP_THROW_RANGE_ERRORS) +# ifndef _STLP_INTERNAL_STDEXCEPT +# include +# endif +# ifndef _STLP_STRING +# include +# endif +# define _STLP_THROW_MSG(ex,msg) throw ex(string(msg)) +# else +# if defined (_STLP_RTTI_BUG) +# define _STLP_THROW_MSG(ex,msg) TerminateProcess(GetCurrentProcess(), 0) +# else +# ifndef _STLP_INTERNAL_CSTDLIB +# include +# endif +# ifndef _STLP_INTERNAL_CSTDIO +# include +# endif +# define _STLP_THROW_MSG(ex,msg) puts(msg),_STLP_ABORT() +# endif +# endif + +// For mode without library and throwing range errors, include the // stdexcept header and throw the appropriate exceptions directly. _STLP_BEGIN_NAMESPACE -inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_range_error(const char* __msg) { - _STLP_THROW_MSG(range_error, __msg); -} -inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_out_of_range(const char* __msg) { - _STLP_THROW_MSG(out_of_range, __msg); -} +inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_runtime_error(const char* __msg) +{ _STLP_THROW_MSG(runtime_error, __msg); } -inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_length_error(const char* __msg) { - _STLP_THROW_MSG(length_error, __msg); -} +inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_range_error(const char* __msg) +{ _STLP_THROW_MSG(range_error, __msg); } -inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_invalid_argument(const char* __msg) { - _STLP_THROW_MSG(invalid_argument, __msg); -} +inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_out_of_range(const char* __msg) +{ _STLP_THROW_MSG(out_of_range, __msg); } -inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_overflow_error(const char* __msg) { - _STLP_THROW_MSG(overflow_error, __msg); -} +inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_length_error(const char* __msg) +{ _STLP_THROW_MSG(length_error, __msg); } + +inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_invalid_argument(const char* __msg) +{ _STLP_THROW_MSG(invalid_argument, __msg); } + +inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_overflow_error(const char* __msg) +{ _STLP_THROW_MSG(overflow_error, __msg); } + _STLP_END_NAMESPACE -# undef _STLP_THROW_MSG +# undef _STLP_THROW_MSG -# endif /* EXTERN_RANGE_ERRORS */ - +#endif /* EXTERN_RANGE_ERRORS */ #endif /* _STLP_RANGE_ERRORS_H */