// -*- C++ -*- /*************************************************************************** * * - definitions of the exception classes * * $Id: //stdlib/dev/include/stdexcept#15 $ * *************************************************************************** * * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave * Software division. Licensed under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0. Unless required by * applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License * for the specific language governing permissions and limitations under * the License. * **************************************************************************/ #ifndef _RWSTD_STDEXCEPT_INCLUDED #define _RWSTD_STDEXCEPT_INCLUDED #include // for __rw_exception and string #include _RWSTD_NAMESPACE (std) { // classes below are _RWSTD_EXPORT'ed to prevent // MSVC warnings issued when they are derived from // 19.1.1 struct _RWSTD_EXPORT logic_error: _RW::__rw_exception { _EXPLICIT logic_error (const string& __str) : _RW::__rw_exception (__str) { } // extension _EXPLICIT logic_error (const char *__s = 0) : _RW::__rw_exception (__s) { } }; // 19.1.2 struct _RWSTD_EXPORT domain_error: logic_error { _EXPLICIT domain_error (const string &__str) : logic_error (__str) { } // extension _EXPLICIT domain_error (const char *__s = 0) : logic_error (__s) { } }; // 19.1.3 struct _RWSTD_EXPORT invalid_argument: logic_error { _EXPLICIT invalid_argument (const string &__str) : logic_error (__str) { } // extension _EXPLICIT invalid_argument (const char *__s = 0) : logic_error (__s) { } }; // 19.1.4 struct _RWSTD_EXPORT length_error: logic_error { _EXPLICIT length_error (const string &__str) : logic_error (__str) { } // extension _EXPLICIT length_error (const char *__s = 0) : logic_error (__s) { } }; // 19.1.5 struct _RWSTD_EXPORT out_of_range: logic_error { _EXPLICIT out_of_range (const string &__str) : logic_error (__str) { } // extension _EXPLICIT out_of_range (const char *__s = 0) : logic_error (__s) { } }; // 19.1.6 struct _RWSTD_EXPORT runtime_error: _RW::__rw_exception { _EXPLICIT runtime_error (const string &__str) : _RW::__rw_exception (__str) { } // extension _EXPLICIT runtime_error (const char *__s = 0) : _RW::__rw_exception (__s) { } }; // 19.1.7 struct _RWSTD_EXPORT range_error: runtime_error { _EXPLICIT range_error (const string &__str) : runtime_error (__str) { } // extension _EXPLICIT range_error (const char *__s = 0) : runtime_error (__s) { } }; // 19.1.8 struct _RWSTD_EXPORT overflow_error: runtime_error { _EXPLICIT overflow_error (const string &__str) : runtime_error (__str) { } // extension _EXPLICIT overflow_error (const char *__s = 0) : runtime_error (__s) { } }; // 19.1.9 struct _RWSTD_EXPORT underflow_error: runtime_error { _EXPLICIT underflow_error (const string &__str) : runtime_error (__str) { } // extension _EXPLICIT underflow_error (const char *__s = 0) : runtime_error (__s) { } }; } // namespace std #endif // _RWSTD_STDEXCEPT_INCLUDED