14#include <system_error>
19 class system_exception;
52 template<
typename exception_t>
71 virtual
void help_link(const
xtd::
string& value) noexcept;
82 virtual const std::error_code& error_code() const noexcept;
85 virtual
void error_code(const std::error_code& value) noexcept;
93 virtual const
xtd::
string& message() const noexcept;
98 virtual const
xtd::
string& source() const noexcept;
102 virtual
void source(const
xtd::
string& value) noexcept;
106 virtual
xtd::
string stack_trace() const noexcept;
114 virtual const
xtd::diagnostics::stack_frame& get_last_stack_frame() const noexcept;
117 xtd::
string to_string() const noexcept override;
121 const
char* what() const noexcept override;
129 static
bool enable_stack_trace() noexcept;
132 static
void enable_stack_trace(
bool enable) noexcept;
137 xtd::
string stack_trace_to_string() const noexcept;
139 const
xtd::
string& get_name() const noexcept;
143 static
bool enable_stack_trace_;
Represents text as a sequence of character units.
Definition basic_string.hpp:79
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition stack_frame.hpp:47
static stack_frame current(const xtd::source_location &value=xtd::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:28
xtd::optional< std::reference_wrapper< const xtd::exception > > exception_ref
Optional reference wrapper on std::exception.
Definition exception.hpp:34
exception(const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Create a new instance of class exception.
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.
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:53
virtual const xtd::string & help_link() const noexcept
Gets a link to the help file associated with this exception.
Contains the HRESULT values used by xtd.
Definition h_result.hpp:94
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:42
Contains core_export_ keyword.
#define core_export_
Define shared library export.
Definition core_export.hpp:13
xtd::sptr< type_t > ptr
The xtd::ptr object is a shared pointer.
Definition ptr.hpp:27
std::optional< type_t > optional
Represents the null_opt alias on std::nullopt_t.
Definition optional.hpp:181
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
std::unique_ptr< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
Contains xtd::h_result class.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Contains xtd::nullopt valiue.
Contains xtd::object class.
Contains xtd::optional type.
Contains xtd::diagnostics::stack_frame class.
Contains xtd::string alias.