1 //===---------------------------- exception.cpp ---------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include <new> 10 #include <exception> 11 12 namespace std 13 { 14 15 // exception 16 17 exception::~exception() noexcept 18 { 19 } 20 21 const char* exception::what() const noexcept 22 { 23 return "std::exception"; 24 } 25 26 // bad_exception 27 28 bad_exception::~bad_exception() noexcept 29 { 30 } 31 32 const char* bad_exception::what() const noexcept 33 { 34 return "std::bad_exception"; 35 } 36 37 38 // bad_alloc 39 40 bad_alloc::bad_alloc() noexcept 41 { 42 } 43 44 bad_alloc::~bad_alloc() noexcept 45 { 46 } 47 48 const char* 49 bad_alloc::what() const noexcept 50 { 51 return "std::bad_alloc"; 52 } 53 54 // bad_array_new_length 55 56 bad_array_new_length::bad_array_new_length() noexcept 57 { 58 } 59 60 bad_array_new_length::~bad_array_new_length() noexcept 61 { 62 } 63 64 const char* 65 bad_array_new_length::what() const noexcept 66 { 67 return "bad_array_new_length"; 68 } 69 70 } // std 71