16#include <system_error>
54 template<
class exception_t>
123 const
char*
what() const noexcept override;
139 xtd::
string stack_trace_to_string() const noexcept;
141 const
xtd::
string& get_name() const noexcept;
145 static
bool enable_stack_trace_;
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition stack_frame.hpp:48
static stack_frame current(const xtd::diagnostics::source_location &value=xtd::diagnostics::source_location::current()) noexcept
Crates a new xtd::diagnostics::stack_frame object corresponding to the location of the call site.
Defines the base class for predefined exceptions in the xtd namespace.
Definition exception.hpp:30
virtual const std::error_code & error_code() const noexcept
Gets error associate to the exception.
xtd::string to_string() const noexcept override
Returns a string that represents the current exception.
virtual const xtd::string & message() const noexcept
Gets message associate to the exception.
exception(const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Create a new instance of class exception.
virtual const xtd::string & source() const noexcept
Gets the name of the application or the object that causes the error.
exception(const xtd::optional< xtd::string > &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Create a new instance of class exception.
virtual const xtd::diagnostics::stack_frame & get_last_stack_frame() const noexcept
Gets the last stack frame where the exception occurred.
virtual int32 h_result() const noexcept
Gets HRESULT, a coded numerical value that is assigned to a specific exception.
const char * what() const noexcept override
Gets message associate to the exception.
virtual exception_ref inner_exception() const noexcept
Gets the exception instance that caused the current exception.
exception(const xtd::optional< xtd::string > &message, const exception_t &inner_exception, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Create a new instance of class exception.
Definition exception.hpp:55
virtual xtd::string stack_trace() const noexcept
Gets a string representation of the immediate frames on the call stack.
xtd::optional< xtd::ref< const xtd::exception > > exception_ref
Optional reference wrapper on std::exception.
Definition exception.hpp:36
virtual const xtd::string & help_link() const noexcept
Gets a link to the help file associated with this exception.
static bool enable_stack_trace() noexcept
Gets if the generation of the stack trace is enabled.
xtd::unique_ptr_object< object_t > memberwise_clone() const
Creates a shallow copy of the current object.
object()=default
Create a new instance of the ultimate base class object.
The exception that is thrown when a method call is invalid for the object's current state.
Definition system_exception.hpp:18
Contains core_export_ keyword.
#define core_export_
Define shared library export.
Definition core_export.hpp:13
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
xtd::unique_ptr_object< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
xtd::sptr< type_t > ptr
The xtd::ptr object is a shared pointer.
Definition ptr.hpp:27
std::optional< type_t > optional
Represents the optional alias on std::optional.
Definition optional.hpp:25
Contains xtd::h_result class.
Contains xtd::translator suffixes.
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr const_pointer data() const noexcept
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:201
Contains xtd::nullopt valiue.
Contains xtd::object class.
Contains xtd::optional type.
Contains xtd::diagnostics::stack_frame class.
Contains xtd::string alias.