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