blob: b1fc21f412aa941b35394f8224d703650b8fcd8f [file] [log] [blame]
Louis Dionne6edba262021-11-17 16:25:01 -05001//===----------------------------------------------------------------------===//
Howard Hinnant62f8b1f2012-01-24 21:48:10 +00002//
Chandler Carruth87bc9b42019-01-19 10:56:40 +00003// 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 Hinnant62f8b1f2012-01-24 21:48:10 +00006//
7//===----------------------------------------------------------------------===//
8
Eric Fiselierb8828922017-03-01 23:59:34 +00009#include <new>
Howard Hinnant62f8b1f2012-01-24 21:48:10 +000010#include <exception>
11
Howard Hinnant62f8b1f2012-01-24 21:48:10 +000012namespace std
13{
14
15// exception
16
Louis Dionne1d2faed2021-03-01 12:09:45 -050017exception::~exception() noexcept
Howard Hinnant62f8b1f2012-01-24 21:48:10 +000018{
19}
20
Louis Dionne1d2faed2021-03-01 12:09:45 -050021const char* exception::what() const noexcept
Howard Hinnant62f8b1f2012-01-24 21:48:10 +000022{
23 return "std::exception";
24}
25
26// bad_exception
27
Louis Dionne1d2faed2021-03-01 12:09:45 -050028bad_exception::~bad_exception() noexcept
Howard Hinnant62f8b1f2012-01-24 21:48:10 +000029{
30}
31
Louis Dionne1d2faed2021-03-01 12:09:45 -050032const char* bad_exception::what() const noexcept
Howard Hinnant62f8b1f2012-01-24 21:48:10 +000033{
34 return "std::bad_exception";
35}
36
Eric Fiselierb8828922017-03-01 23:59:34 +000037
38// bad_alloc
39
Louis Dionne1d2faed2021-03-01 12:09:45 -050040bad_alloc::bad_alloc() noexcept
Eric Fiselierb8828922017-03-01 23:59:34 +000041{
42}
43
Louis Dionne1d2faed2021-03-01 12:09:45 -050044bad_alloc::~bad_alloc() noexcept
Eric Fiselierb8828922017-03-01 23:59:34 +000045{
46}
47
48const char*
Louis Dionne1d2faed2021-03-01 12:09:45 -050049bad_alloc::what() const noexcept
Eric Fiselierb8828922017-03-01 23:59:34 +000050{
51 return "std::bad_alloc";
52}
53
54// bad_array_new_length
55
Louis Dionne1d2faed2021-03-01 12:09:45 -050056bad_array_new_length::bad_array_new_length() noexcept
Eric Fiselierb8828922017-03-01 23:59:34 +000057{
58}
59
Louis Dionne1d2faed2021-03-01 12:09:45 -050060bad_array_new_length::~bad_array_new_length() noexcept
Eric Fiselierb8828922017-03-01 23:59:34 +000061{
62}
63
64const char*
Louis Dionne1d2faed2021-03-01 12:09:45 -050065bad_array_new_length::what() const noexcept
Eric Fiselierb8828922017-03-01 23:59:34 +000066{
67 return "bad_array_new_length";
68}
69
Howard Hinnant62f8b1f2012-01-24 21:48:10 +000070} // std