14cc2045aSjoerg /*
24cc2045aSjoerg  * Copyright 2010-2011 PathScale, Inc. All rights reserved.
34cc2045aSjoerg  *
44cc2045aSjoerg  * Redistribution and use in source and binary forms, with or without
54cc2045aSjoerg  * modification, are permitted provided that the following conditions are met:
64cc2045aSjoerg  *
74cc2045aSjoerg  * 1. Redistributions of source code must retain the above copyright notice,
84cc2045aSjoerg  *    this list of conditions and the following disclaimer.
94cc2045aSjoerg  *
104cc2045aSjoerg  * 2. Redistributions in binary form must reproduce the above copyright notice,
114cc2045aSjoerg  *    this list of conditions and the following disclaimer in the documentation
124cc2045aSjoerg  *    and/or other materials provided with the distribution.
134cc2045aSjoerg  *
144cc2045aSjoerg  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
154cc2045aSjoerg  * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
164cc2045aSjoerg  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
174cc2045aSjoerg  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
184cc2045aSjoerg  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
194cc2045aSjoerg  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
204cc2045aSjoerg  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
214cc2045aSjoerg  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
224cc2045aSjoerg  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
234cc2045aSjoerg  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
244cc2045aSjoerg  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
254cc2045aSjoerg  */
264cc2045aSjoerg 
274cc2045aSjoerg /**
284cc2045aSjoerg  * stdexcept.h - provides a stub version of <stdexcept>, which defines enough
294cc2045aSjoerg  * of the exceptions for the runtime to use.
304cc2045aSjoerg  */
314cc2045aSjoerg 
324cc2045aSjoerg namespace std
334cc2045aSjoerg {
344cc2045aSjoerg 
354cc2045aSjoerg 	class exception
364cc2045aSjoerg 	{
374cc2045aSjoerg 	public:
384cc2045aSjoerg 		exception() throw();
394cc2045aSjoerg 		exception(const exception&) throw();
404cc2045aSjoerg 		exception& operator=(const exception&) throw();
414cc2045aSjoerg 		virtual ~exception();
424cc2045aSjoerg 		virtual const char* what() const throw();
434cc2045aSjoerg 	};
444cc2045aSjoerg 
454cc2045aSjoerg 
464cc2045aSjoerg 	/**
474cc2045aSjoerg 	 * Bad allocation exception.  Thrown by ::operator new() if it fails.
484cc2045aSjoerg 	 */
494cc2045aSjoerg 	class bad_alloc: public exception
504cc2045aSjoerg 	{
514cc2045aSjoerg 	public:
524cc2045aSjoerg 		bad_alloc() throw();
534cc2045aSjoerg 		bad_alloc(const bad_alloc&) throw();
544cc2045aSjoerg 		bad_alloc& operator=(const bad_alloc&) throw();
554cc2045aSjoerg 		~bad_alloc();
564cc2045aSjoerg 		virtual const char* what() const throw();
574cc2045aSjoerg 	};
584cc2045aSjoerg 
594cc2045aSjoerg 	/**
604cc2045aSjoerg 	 * Bad cast exception.  Thrown by the __cxa_bad_cast() helper function.
614cc2045aSjoerg 	 */
624cc2045aSjoerg 	class bad_cast: public exception {
634cc2045aSjoerg 	public:
644cc2045aSjoerg 		bad_cast() throw();
654cc2045aSjoerg 		bad_cast(const bad_cast&) throw();
664cc2045aSjoerg 		bad_cast& operator=(const bad_cast&) throw();
674cc2045aSjoerg 		virtual ~bad_cast();
684cc2045aSjoerg 		virtual const char* what() const throw();
694cc2045aSjoerg 	};
704cc2045aSjoerg 
714cc2045aSjoerg 	/**
724cc2045aSjoerg 	 * Bad typeidexception.  Thrown by the __cxa_bad_typeid() helper function.
734cc2045aSjoerg 	 */
744cc2045aSjoerg 	class bad_typeid: public exception
754cc2045aSjoerg 	{
764cc2045aSjoerg 	public:
774cc2045aSjoerg 		bad_typeid() throw();
784cc2045aSjoerg 		bad_typeid(const bad_typeid &__rhs) throw();
794cc2045aSjoerg 		virtual ~bad_typeid();
804cc2045aSjoerg 		bad_typeid& operator=(const bad_typeid &__rhs) throw();
814cc2045aSjoerg 		virtual const char* what() const throw();
824cc2045aSjoerg 	};
834cc2045aSjoerg 
84*86b377d0Spooka 	class bad_array_new_length: public bad_alloc
85*86b377d0Spooka 	{
86*86b377d0Spooka 	public:
87*86b377d0Spooka 		bad_array_new_length() throw();
88*86b377d0Spooka 		bad_array_new_length(const bad_array_new_length&) throw();
89*86b377d0Spooka 		bad_array_new_length& operator=(const bad_array_new_length&) throw();
90*86b377d0Spooka 		virtual ~bad_array_new_length();
91*86b377d0Spooka 		virtual const char *what() const throw();
92*86b377d0Spooka 	};
934cc2045aSjoerg 
944cc2045aSjoerg 
954cc2045aSjoerg } // namespace std
964cc2045aSjoerg 
97