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