1 //===---------------------------- exception.cpp ---------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #define _LIBCPP_BUILDING_LIBRARY 11 #include <new> 12 #include <exception> 13 14 namespace std 15 { 16 17 // exception 18 ~exception()19exception::~exception() _NOEXCEPT 20 { 21 } 22 what() const23const char* exception::what() const _NOEXCEPT 24 { 25 return "std::exception"; 26 } 27 28 // bad_exception 29 ~bad_exception()30bad_exception::~bad_exception() _NOEXCEPT 31 { 32 } 33 what() const34const char* bad_exception::what() const _NOEXCEPT 35 { 36 return "std::bad_exception"; 37 } 38 39 40 // bad_alloc 41 bad_alloc()42bad_alloc::bad_alloc() _NOEXCEPT 43 { 44 } 45 ~bad_alloc()46bad_alloc::~bad_alloc() _NOEXCEPT 47 { 48 } 49 50 const char* what() const51bad_alloc::what() const _NOEXCEPT 52 { 53 return "std::bad_alloc"; 54 } 55 56 // bad_array_new_length 57 bad_array_new_length()58bad_array_new_length::bad_array_new_length() _NOEXCEPT 59 { 60 } 61 ~bad_array_new_length()62bad_array_new_length::~bad_array_new_length() _NOEXCEPT 63 { 64 } 65 66 const char* what() const67bad_array_new_length::what() const _NOEXCEPT 68 { 69 return "bad_array_new_length"; 70 } 71 72 } // std 73