Lines Matching refs:exception

5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
14 // <vcruntime_exception.h> defines its own std::exception and std::bad_exception types,
27 // The std::exception class was already included above, but we're explicit about this condition here for clarity.
30 // However, <vcruntime_exception.h> does not define std::exception and std::bad_exception
33 // Since libc++ still wants to provide the std::exception hierarchy even when _HAS_EXCEPTIONS == 0
35 // of the VCRuntime std::exception and std::bad_exception types in that mode.
42 class exception { // base of all library exceptions
44 exception() _NOEXCEPT : __data_() {}
46 explicit exception(char const* __message) _NOEXCEPT : __data_() {
51 exception(exception const&) _NOEXCEPT {}
53 exception& operator=(exception const&) _NOEXCEPT { return *this; }
55 virtual ~exception() _NOEXCEPT {}
57 virtual char const* what() const _NOEXCEPT { return __data_._What ? __data_._What : "Unknown exception"; }
63 class bad_exception : public exception {
65 bad_exception() _NOEXCEPT : exception("bad exception") {}
69 // On all other platforms, we define our own std::exception and std::bad_exception types
72 class _LIBCPP_EXPORTED_FROM_ABI exception {
74 _LIBCPP_HIDE_FROM_ABI exception() _NOEXCEPT {}
75 _LIBCPP_HIDE_FROM_ABI exception(const exception&) _NOEXCEPT = default;
76 _LIBCPP_HIDE_FROM_ABI exception& operator=(const exception&) _NOEXCEPT = default;
78 virtual ~exception() _NOEXCEPT;
82 class _LIBCPP_EXPORTED_FROM_ABI bad_exception : public exception {