/*1* Copyright 2010-2011 PathScale, Inc. All rights reserved.2*3* Redistribution and use in source and binary forms, with or without4* modification, are permitted provided that the following conditions are met:5*6* 1. Redistributions of source code must retain the above copyright notice,7* this list of conditions and the following disclaimer.8*9* 2. Redistributions in binary form must reproduce the above copyright notice,10* this list of conditions and the following disclaimer in the documentation11* and/or other materials provided with the distribution.12*13* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS14* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,15* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR16* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR17* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,18* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,19* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;20* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,21* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR22* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF23* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.24*/2526/**27* stdexcept.h - provides a stub version of <stdexcept>, which defines enough28* of the exceptions for the runtime to use.29*/3031#include "cxxabi.h"3233namespace std34{3536class exception37{38public:39exception() _LIBCXXRT_NOEXCEPT;40exception(const exception&) _LIBCXXRT_NOEXCEPT;41exception& operator=(const exception&) _LIBCXXRT_NOEXCEPT;42virtual ~exception();43virtual const char* what() const _LIBCXXRT_NOEXCEPT;44};454647/**48* Bad allocation exception. Thrown by ::operator new() if it fails.49*/50class bad_alloc: public exception51{52public:53bad_alloc() _LIBCXXRT_NOEXCEPT;54bad_alloc(const bad_alloc&) _LIBCXXRT_NOEXCEPT;55bad_alloc& operator=(const bad_alloc&) _LIBCXXRT_NOEXCEPT;56~bad_alloc();57virtual const char* what() const _LIBCXXRT_NOEXCEPT;58};5960/**61* Bad cast exception. Thrown by the __cxa_bad_cast() helper function.62*/63class bad_cast: public exception {64public:65bad_cast() _LIBCXXRT_NOEXCEPT;66bad_cast(const bad_cast&) _LIBCXXRT_NOEXCEPT;67bad_cast& operator=(const bad_cast&) _LIBCXXRT_NOEXCEPT;68virtual ~bad_cast();69virtual const char* what() const _LIBCXXRT_NOEXCEPT;70};7172/**73* Bad typeidexception. Thrown by the __cxa_bad_typeid() helper function.74*/75class bad_typeid: public exception76{77public:78bad_typeid() _LIBCXXRT_NOEXCEPT;79bad_typeid(const bad_typeid &__rhs) _LIBCXXRT_NOEXCEPT;80virtual ~bad_typeid();81bad_typeid& operator=(const bad_typeid &__rhs) _LIBCXXRT_NOEXCEPT;82virtual const char* what() const _LIBCXXRT_NOEXCEPT;83};8485class bad_array_new_length: public bad_alloc86{87public:88bad_array_new_length() _LIBCXXRT_NOEXCEPT;89bad_array_new_length(const bad_array_new_length&) _LIBCXXRT_NOEXCEPT;90bad_array_new_length& operator=(const bad_array_new_length&) _LIBCXXRT_NOEXCEPT;91virtual ~bad_array_new_length();92virtual const char *what() const _LIBCXXRT_NOEXCEPT;93};949596} // namespace std979899100