stdexcept.h revision 227983
118334Speter/** 218334Speter * stdexcept.h - provides a stub version of <stdexcept>, which defines enough 318334Speter * of the exceptions for the runtime to use. 450397Sobrien */ 518334Speter 618334Speternamespace std 718334Speter{ 818334Speter 918334Speter class exception 1018334Speter { 1118334Speter public: 1218334Speter exception() throw(); 1318334Speter exception(const exception&) throw(); 1418334Speter exception& operator=(const exception&) throw(); 1518334Speter virtual ~exception(); 1618334Speter virtual const char* what() const throw(); 1718334Speter }; 1818334Speter 1918334Speter 2018334Speter /** 2118334Speter * Bad allocation exception. Thrown by ::operator new() if it fails. 2218334Speter */ 2318334Speter class bad_alloc: public exception 2418334Speter { 2550397Sobrien public: 2618334Speter bad_alloc() throw(); 2718334Speter bad_alloc(const bad_alloc&) throw(); 2818334Speter bad_alloc& operator=(const bad_alloc&) throw(); 2918334Speter ~bad_alloc(); 3018334Speter virtual const char* what() const throw(); 3118334Speter }; 3218334Speter 3318334Speter /** 3418334Speter * Bad cast exception. Thrown by the __cxa_bad_cast() helper function. 3518334Speter */ 3618334Speter class bad_cast: public exception { 3718334Speter public: 3850397Sobrien bad_cast() throw(); 3918334Speter bad_cast(const bad_cast&) throw(); 4050397Sobrien bad_cast& operator=(const bad_cast&) throw(); 4150397Sobrien virtual ~bad_cast(); 4250397Sobrien virtual const char* what() const throw(); 4350397Sobrien }; 4450397Sobrien 4550397Sobrien /** 4650397Sobrien * Bad typeidexception. Thrown by the __cxa_bad_typeid() helper function. 4750397Sobrien */ 4818334Speter class bad_typeid: public exception 4918334Speter { 5018334Speter public: 5150397Sobrien bad_typeid() throw(); 5218334Speter bad_typeid(const bad_typeid &__rhs) throw(); 5350397Sobrien virtual ~bad_typeid(); 5450397Sobrien bad_typeid& operator=(const bad_typeid &__rhs) throw(); 5518334Speter virtual const char* what() const throw(); 5618334Speter }; 5750397Sobrien 5818334Speter 5918334Speter 6018334Speter} // namespace std 6118334Speter 6218334Speter