Represents an exception whose state is captured at a certain point in code.
Public Properties | |
| auto | exception_captured () const noexcept -> bool |
| Gets a value indicating whether the exception is caught or not. | |
| auto | source_exception () const noexcept -> xtd::ptr< xtd::exception > |
| Gets the exception that's represented by the current instance. | |
| auto | rethrow () -> void |
| Rethrows the exception that's represented by the current xtd::runtime::exception_services::exception_dispatch_info object, after restoring the state that was saved when the exception was captured. | |
| template<class exception_t> requires std::derived_from<exception_t, xtd::exception> | |
| static auto | capture (const exception_t &source) -> exception_dispatch_info |
| Creates an xtd::runtime::exception_services::exception_dispatch_info object that represents the specified exception at the current point in code. | |
| static auto | capture () -> exception_dispatch_info |
| Creates an xtd::runtime::exception_services::exception_dispatch_info object that represents the specified exception at the current point in code. | |
| template<class exception_t> | |
| static auto | rethrow (const exception_t &source) -> void |
| Rehrows the source exception, maintaining the original stack trace information. | |
Public Operators | |
| operator bool () const noexcept | |
| Convert to boolean operator. | |
| operator const std::exception_ptr & () const noexcept | |
| operator std::exception_ptr () noexcept | |
Additional Inherited Members | |
| object ()=default | |
| Create a new instance of the ultimate base class object. | |
| virtual bool | equals (const object &obj) const noexcept |
| Determines whether the specified object is equal to the current object. | |
| virtual xtd::size | get_hash_code () const noexcept |
| Serves as a hash function for a particular type. | |
| virtual type_object | get_type () const noexcept |
| Gets the type of the current instance. | |
| template<class object_t> | |
| xtd::unique_ptr_object< object_t > | memberwise_clone () const |
| Creates a shallow copy of the current object. | |
| virtual xtd::string | to_string () const |
| Returns a xtd::string that represents the current object. | |
| template<class object_a_t, class object_b_t> | |
| static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are considered equal. | |
| template<class object_a_t, class object_b_t> | |
| static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are the same instance. | |
|
inlinenodiscardnoexcept |
Gets a value indicating whether the exception is caught or not.
true if the exception is captured; otherwise false.
|
inlinenodiscardnoexcept |
Gets the exception that's represented by the current instance.
|
inlinestaticnodiscard |
Creates an xtd::runtime::exception_services::exception_dispatch_info object that represents the specified exception at the current point in code.
| source | The exception whose state is captured, and which is represented by the returned object. |
|
inlinestaticnodiscard |
Creates an xtd::runtime::exception_services::exception_dispatch_info object that represents the specified exception at the current point in code.
|
inline |
Rethrows the exception that's represented by the current xtd::runtime::exception_services::exception_dispatch_info object, after restoring the state that was saved when the exception was captured.
|
inlinestatic |
Rehrows the source exception, maintaining the original stack trace information.
|
inlineexplicitnoexcept |
Convert to boolean operator.
true if exception is captured; otherwise false.