Warning, /include/c++/v1/__cxx03/exception is written in an unsupported language. File is not indexed.
0001 // -*- C++ -*-
0002 //===----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009
0010 #ifndef _LIBCPP___CXX03_EXCEPTION
0011 #define _LIBCPP___CXX03_EXCEPTION
0012
0013 /*
0014 exception synopsis
0015
0016 namespace std
0017 {
0018
0019 class exception
0020 {
0021 public:
0022 exception() noexcept;
0023 exception(const exception&) noexcept;
0024 exception& operator=(const exception&) noexcept;
0025 virtual ~exception() noexcept;
0026 virtual const char* what() const noexcept;
0027 };
0028
0029 class bad_exception
0030 : public exception
0031 {
0032 public:
0033 bad_exception() noexcept;
0034 bad_exception(const bad_exception&) noexcept;
0035 bad_exception& operator=(const bad_exception&) noexcept;
0036 virtual ~bad_exception() noexcept;
0037 virtual const char* what() const noexcept;
0038 };
0039
0040 typedef void (*unexpected_handler)();
0041 unexpected_handler set_unexpected(unexpected_handler f ) noexcept;
0042 unexpected_handler get_unexpected() noexcept;
0043 [[noreturn]] void unexpected();
0044
0045 typedef void (*terminate_handler)();
0046 terminate_handler set_terminate(terminate_handler f ) noexcept;
0047 terminate_handler get_terminate() noexcept;
0048 [[noreturn]] void terminate() noexcept;
0049
0050 bool uncaught_exception() noexcept;
0051 int uncaught_exceptions() noexcept; // C++17
0052
0053 typedef unspecified exception_ptr;
0054
0055 exception_ptr current_exception() noexcept;
0056 void rethrow_exception [[noreturn]] (exception_ptr p);
0057 template<class E> exception_ptr make_exception_ptr(E e) noexcept;
0058
0059 class nested_exception
0060 {
0061 public:
0062 nested_exception() noexcept;
0063 nested_exception(const nested_exception&) noexcept = default;
0064 nested_exception& operator=(const nested_exception&) noexcept = default;
0065 virtual ~nested_exception() = default;
0066
0067 // access functions
0068 [[noreturn]] void rethrow_nested() const;
0069 exception_ptr nested_ptr() const noexcept;
0070 };
0071
0072 template <class T> [[noreturn]] void throw_with_nested(T&& t);
0073 template <class E> void rethrow_if_nested(const E& e);
0074
0075 } // std
0076
0077 */
0078
0079 #include <__cxx03/__config>
0080 #include <__cxx03/__exception/exception.h>
0081 #include <__cxx03/__exception/exception_ptr.h>
0082 #include <__cxx03/__exception/nested_exception.h>
0083 #include <__cxx03/__exception/operations.h>
0084 #include <__cxx03/__exception/terminate.h>
0085 #include <__cxx03/version>
0086
0087 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0088 # pragma GCC system_header
0089 #endif
0090
0091 #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
0092 # include <__cxx03/cstdlib>
0093 # include <__cxx03/type_traits>
0094 #endif
0095
0096 #endif // _LIBCPP___CXX03_EXCEPTION