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 #define _LIBCPP_BUILDING_LIBRARY
10 #include <new>
11 #include <exception>
12 
13 namespace std
14 {
15 
16 // exception
17 
~exception()18 exception::~exception() _NOEXCEPT
19 {
20 }
21 
what() const22 const char* exception::what() const _NOEXCEPT
23 {
24   return "std::exception";
25 }
26 
27 // bad_exception
28 
~bad_exception()29 bad_exception::~bad_exception() _NOEXCEPT
30 {
31 }
32 
what() const33 const char* bad_exception::what() const _NOEXCEPT
34 {
35   return "std::bad_exception";
36 }
37 
38 
39 //  bad_alloc
40 
bad_alloc()41 bad_alloc::bad_alloc() _NOEXCEPT
42 {
43 }
44 
~bad_alloc()45 bad_alloc::~bad_alloc() _NOEXCEPT
46 {
47 }
48 
49 const char*
what() const50 bad_alloc::what() const _NOEXCEPT
51 {
52     return "std::bad_alloc";
53 }
54 
55 // bad_array_new_length
56 
bad_array_new_length()57 bad_array_new_length::bad_array_new_length() _NOEXCEPT
58 {
59 }
60 
~bad_array_new_length()61 bad_array_new_length::~bad_array_new_length() _NOEXCEPT
62 {
63 }
64 
65 const char*
what() const66 bad_array_new_length::what() const _NOEXCEPT
67 {
68     return "bad_array_new_length";
69 }
70 
71 }  // std
72