Howard Hinnant | 7fdfd5d | 2012-01-24 21:48:10 | [diff] [blame] | 1 | //===---------------------------- exception.cpp ---------------------------===// |
| 2 | // |
Chandler Carruth | 57b08b0 | 2019-01-19 10:56:40 | [diff] [blame] | 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 |
Howard Hinnant | 7fdfd5d | 2012-01-24 21:48:10 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
Eric Fiselier | 3781227 | 2017-03-01 23:59:34 | [diff] [blame] | 9 | #define _LIBCPP_BUILDING_LIBRARY |
Eric Fiselier | 3781227 | 2017-03-01 23:59:34 | [diff] [blame] | 10 | #include <new> |
Howard Hinnant | 7fdfd5d | 2012-01-24 21:48:10 | [diff] [blame] | 11 | #include <exception> |
| 12 | |
Howard Hinnant | 7fdfd5d | 2012-01-24 21:48:10 | [diff] [blame] | 13 | namespace std |
| 14 | { |
| 15 | |
| 16 | // exception |
| 17 | |
| 18 | exception::~exception() _NOEXCEPT |
| 19 | { |
| 20 | } |
| 21 | |
| 22 | const char* exception::what() const _NOEXCEPT |
| 23 | { |
| 24 | return "std::exception"; |
| 25 | } |
| 26 | |
| 27 | // bad_exception |
| 28 | |
| 29 | bad_exception::~bad_exception() _NOEXCEPT |
| 30 | { |
| 31 | } |
| 32 | |
| 33 | const char* bad_exception::what() const _NOEXCEPT |
| 34 | { |
| 35 | return "std::bad_exception"; |
| 36 | } |
| 37 | |
Eric Fiselier | 3781227 | 2017-03-01 23:59:34 | [diff] [blame] | 38 | |
| 39 | // bad_alloc |
| 40 | |
| 41 | bad_alloc::bad_alloc() _NOEXCEPT |
| 42 | { |
| 43 | } |
| 44 | |
| 45 | bad_alloc::~bad_alloc() _NOEXCEPT |
| 46 | { |
| 47 | } |
| 48 | |
| 49 | const char* |
| 50 | bad_alloc::what() const _NOEXCEPT |
| 51 | { |
| 52 | return "std::bad_alloc"; |
| 53 | } |
| 54 | |
| 55 | // bad_array_new_length |
| 56 | |
| 57 | bad_array_new_length::bad_array_new_length() _NOEXCEPT |
| 58 | { |
| 59 | } |
| 60 | |
| 61 | bad_array_new_length::~bad_array_new_length() _NOEXCEPT |
| 62 | { |
| 63 | } |
| 64 | |
| 65 | const char* |
| 66 | bad_array_new_length::what() const _NOEXCEPT |
| 67 | { |
| 68 | return "bad_array_new_length"; |
| 69 | } |
| 70 | |
Howard Hinnant | 7fdfd5d | 2012-01-24 21:48:10 | [diff] [blame] | 71 | } // std |