Whole document tree
    

Whole document tree

std_stdexcept.h Source File
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

std_stdexcept.h

Go to the documentation of this file.
00001 // Standard exception classes  -*- C++ -*-
00002 
00003 // Copyright (C) 2001 Free Software Foundation, Inc.
00004 //
00005 // This file is part of the GNU ISO C++ Library.  This library is free
00006 // software; you can redistribute it and/or modify it under the
00007 // terms of the GNU General Public License as published by the
00008 // Free Software Foundation; either version 2, or (at your option)
00009 // any later version.
00010 
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License for more details.
00015 
00016 // You should have received a copy of the GNU General Public License along
00017 // with this library; see the file COPYING.  If not, write to the Free
00018 // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
00019 // USA.
00020 
00021 // As a special exception, you may use this file as part of a free software
00022 // library without restriction.  Specifically, if other files instantiate
00023 // templates or use macros or inline functions from this file, or you compile
00024 // this file and link it with other files to produce an executable, this
00025 // file does not by itself cause the resulting executable to be covered by
00026 // the GNU General Public License.  This exception does not however
00027 // invalidate any other reasons why the executable file might be covered by
00028 // the GNU General Public License.
00029 
00030 //
00031 // ISO C++ 19.1  Exception classes
00032 //
00033 
00041 #ifndef _CPP_STDEXCEPT
00042 #define _CPP_STDEXCEPT    1
00043 
00044 #pragma GCC system_header
00045 
00046 #include <exception>
00047 #include <string>
00048 
00049 namespace std 
00050 {
00056   class logic_error : public exception 
00057   {
00058     string _M_msg;
00059 
00060   public:
00062     explicit 
00063     logic_error(const string&  __arg);
00064 
00065     virtual 
00066     ~logic_error() throw();
00067 
00070     virtual const char* 
00071     what() const throw();
00072   };
00073 
00076   class domain_error : public logic_error 
00077   {
00078   public:
00079     explicit domain_error(const string&  __arg);
00080   };
00081 
00083   class invalid_argument : public logic_error 
00084   {
00085   public:
00086     explicit invalid_argument(const string&  __arg);
00087   };
00088 
00091   class length_error : public logic_error 
00092   {
00093   public:
00094     explicit length_error(const string&  __arg);
00095   };
00096 
00099   class out_of_range : public logic_error 
00100   {
00101   public:
00102     explicit out_of_range(const string&  __arg);
00103   };
00104 
00110   class runtime_error : public exception 
00111   {
00112     string _M_msg;
00113 
00114   public:
00116     explicit 
00117     runtime_error(const string&  __arg);
00118 
00119     virtual 
00120     ~runtime_error() throw();
00121 
00124     virtual const char* 
00125     what() const throw();
00126   };
00127 
00129   class range_error : public runtime_error 
00130   {
00131   public:
00132     explicit range_error(const string&  __arg);
00133   };
00134 
00136   class overflow_error : public runtime_error 
00137   {
00138   public:
00139     explicit overflow_error(const string&  __arg);
00140   };
00141 
00143   class underflow_error : public runtime_error 
00144   {
00145   public:
00146     explicit underflow_error(const string&  __arg);
00147   };
00148 } // namespace std
00149 
00150 #endif // _CPP_STDEXCEPT

Generated on Mon Apr 8 03:11:34 2002 for libstdc++-v3 Source by doxygen1.2.15