Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

exception

Go to the documentation of this file.
00001 // Exception Handling support header for -*- C++ -*-
00002 
00003 // Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation
00004 //
00005 // This file is part of GNU CC.
00006 //
00007 // GNU CC is free software; you can redistribute it and/or modify
00008 // it under the terms of the GNU General Public License as published by
00009 // the Free Software Foundation; either version 2, or (at your option)
00010 // any later version.
00011 // 
00012 // GNU CC is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 // 
00017 // You should have received a copy of the GNU General Public License
00018 // along with GNU CC; see the file COPYING.  If not, write to
00019 // the Free Software Foundation, 59 Temple Place - Suite 330,
00020 // Boston, MA 02111-1307, USA.
00021 
00022 // As a special exception, you may use this file as part of a free software
00023 // library without restriction.  Specifically, if other files instantiate
00024 // templates or use macros or inline functions from this file, or you compile
00025 // this file and link it with other files to produce an executable, this
00026 // file does not by itself cause the resulting executable to be covered by
00027 // the GNU General Public License.  This exception does not however
00028 // invalidate any other reasons why the executable file might be covered by
00029 // the GNU General Public License.
00030 
00036 #ifndef __EXCEPTION__
00037 #define __EXCEPTION__
00038 
00039 extern "C++" {
00040 
00041 namespace std 
00042 {
00049   class exception 
00050   {
00051   public:
00052     exception() throw() { }
00053     virtual ~exception() throw();
00056     virtual const char* what() const throw();
00057   };
00058 
00061   class bad_exception : public exception 
00062   {
00063   public:
00064     bad_exception() throw() { }
00065     virtual ~bad_exception() throw();
00066   };
00067 
00069   typedef void (*terminate_handler) ();
00071   typedef void (*unexpected_handler) ();
00072 
00074   terminate_handler set_terminate(terminate_handler) throw();
00077   void terminate() __attribute__ ((__noreturn__));
00078 
00080   unexpected_handler set_unexpected(unexpected_handler) throw();
00083   void unexpected() __attribute__ ((__noreturn__));
00084 
00095   bool uncaught_exception() throw();
00096 } // namespace std
00097 
00098 } // extern "C++"
00099 
00100 #endif

Generated on Sat Apr 19 07:14:20 2003 for libstdc++-v3 Source by doxygen1.2.15