blob: 91b48d86ff7ef941b7f9d121b61515634222ff9d [file] [log] [blame]
// -*- C++ -*-
/***************************************************************************
*
* <stdexcept> - definitions of the exception classes
*
* $Id$
*
***************************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you 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.
*
* Copyright 1994-2006 Rogue Wave Software.
*
**************************************************************************/
#ifndef _RWSTD_STDEXCEPT_INCLUDED
#define _RWSTD_STDEXCEPT_INCLUDED
#include <rw/_exception.h> // for __rw_exception and string
#include <rw/_defs.h>
_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) { }
virtual ~logic_error () _THROWS (());
};
// 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) { }
virtual ~domain_error () _THROWS (());
};
// 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) { }
virtual ~invalid_argument () _THROWS (());
};
// 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) { }
virtual ~length_error () _THROWS (());
};
// 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) { }
virtual ~out_of_range () _THROWS (());
};
// 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) { }
virtual ~runtime_error () _THROWS (());
};
// 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) { }
virtual ~range_error () _THROWS (());
};
// 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) { }
virtual ~overflow_error () _THROWS (());
};
// 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) { }
virtual ~underflow_error () _THROWS (());
};
} // namespace std
#endif // _RWSTD_STDEXCEPT_INCLUDED