blob: 88d911d96c96f5c2c6855110a8c0c4e93552b760 [file] [log] [blame]
Howard Hinnant7fdfd5d2012-01-24 21:48:101//===---------------------------- exception.cpp ---------------------------===//
2//
Chandler Carruth57b08b02019-01-19 10:56:403// 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 Hinnant7fdfd5d2012-01-24 21:48:106//
7//===----------------------------------------------------------------------===//
8
Eric Fiselier37812272017-03-01 23:59:349#define _LIBCPP_BUILDING_LIBRARY
Eric Fiselier37812272017-03-01 23:59:3410#include <new>
Howard Hinnant7fdfd5d2012-01-24 21:48:1011#include <exception>
12
Howard Hinnant7fdfd5d2012-01-24 21:48:1013namespace 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
Eric Fiselier37812272017-03-01 23:59:3438
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
Howard Hinnant7fdfd5d2012-01-24 21:48:1071} // std