xtd - Reference Guide
0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
|
#include <system_exception.h>
Defines the base class for predefined exceptions in the xtd namespace.
Inherits xtd::object, and std::exception.
Inherited by xtd::argument_exception, xtd::arithmetic_exception, xtd::collections::key_not_found_exception, xtd::domain_exception, xtd::format_exception, xtd::index_out_of_range_exception, xtd::invalid_cast_exception, xtd::invalid_operation_exception, xtd::invalid_program_exception, xtd::io::io_exception, xtd::length_exception, xtd::net::sockets::socket_exception, xtd::not_implemented_exception, xtd::not_supported_exception, xtd::null_pointer_exception, xtd::object_closed_exception, xtd::operation_canceled_exception, xtd::time_out_exception, and xtd::xml_syntax_exception.
Public Types | |
using | exception_ref = std::optional< std::reference_wrapper< const std::exception > > |
Optional reference wrapper on std::exception. More... | |
Public Member Functions | |
system_exception (const std::exception &inner_exception, const xtd::diagnostics::stack_frame &information=xtd::diagnostics::stack_frame::empty()) | |
Create a new instance of class system_exception. More... | |
system_exception (const xtd::diagnostics::stack_frame &information=xtd::diagnostics::stack_frame::empty()) | |
Create a new instance of class system_exception. More... | |
system_exception (const xtd::ustring &message, const std::error_code &error, const xtd::diagnostics::stack_frame &information=xtd::diagnostics::stack_frame::empty()) | |
Create a new instance of class system_exception. More... | |
system_exception (const xtd::ustring &message, const std::error_code &error, const xtd::ustring &help_link, const xtd::diagnostics::stack_frame &information=xtd::diagnostics::stack_frame::empty()) | |
Create a new instance of class system_exception. More... | |
system_exception (const xtd::ustring &message, const std::exception &inner_exception, const std::error_code &error, const xtd::diagnostics::stack_frame &information=xtd::diagnostics::stack_frame::empty()) | |
Create a new instance of class system_exception. More... | |
system_exception (const xtd::ustring &message, const std::exception &inner_exception, const std::error_code &error, const xtd::ustring &help_link, const xtd::diagnostics::stack_frame &information=xtd::diagnostics::stack_frame::empty()) | |
Create a new instance of class system_exception. More... | |
system_exception (const xtd::ustring &message, const std::exception &inner_exception, const xtd::diagnostics::stack_frame &information=xtd::diagnostics::stack_frame::empty()) | |
Create a new instance of class system_exception. More... | |
system_exception (const xtd::ustring &message, const std::exception &inner_exception, const xtd::ustring &help_link, const xtd::diagnostics::stack_frame &information=xtd::diagnostics::stack_frame::empty()) | |
Create a new instance of class system_exception. More... | |
system_exception (const xtd::ustring &message, const xtd::diagnostics::stack_frame &information=xtd::diagnostics::stack_frame::empty()) | |
Create a new instance of class system_exception. More... | |
system_exception (const xtd::ustring &message, const xtd::ustring &help_link, const xtd::diagnostics::stack_frame &information=xtd::diagnostics::stack_frame::empty()) | |
Create a new instance of class system_exception. More... | |
virtual std::error_code | error_code () const noexcept |
Get error associate to the exception. More... | |
virtual const xtd::ustring & | file_path () const noexcept |
Get file path where exception occurred. More... | |
virtual const xtd::ustring & | help_link () const noexcept |
Gets a link to the help file associated with this exception. More... | |
virtual exception_ref | inner_exception () const noexcept |
Gets the exception instance that caused the current exception. More... | |
virtual uint32_t | line_number () const noexcept |
Get Line number where the exception occurred. More... | |
virtual const xtd::ustring & | member_name () const noexcept |
Get file member where exception occurred. More... | |
virtual const xtd::ustring & | message () const noexcept |
Get message associate to the exception. More... | |
virtual const xtd::ustring & | name () const noexcept |
Get full class name the exception. More... | |
virtual xtd::ustring | stack_trace () const noexcept |
Gets a string representation of the immediate frames on the call stack. More... | |
xtd::ustring | to_string () const noexcept override |
Returns a string that represents the current exception. More... | |
const char * | what () const noexcept override |
Get message associate to the exception. More... | |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. More... | |
virtual bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. More... | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. More... | |
template<typename object_t > | |
std::unique_ptr< object_t > | memberwise_clone () const |
Gets the type of the current instance. More... | |
Static Public Member Functions | |
static bool | enable_stack_trace () |
Gets or sets if the generation of the stack trace is enabled. More... | |
static void | enable_stack_trace (bool enable) |
Static Public Member Functions inherited from xtd::object | |
static bool | equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are considered equal. More... | |
static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are the same instance. More... | |
using xtd::system_exception::exception_ref = std::optional<std::reference_wrapper<const std::exception> > |
Optional reference wrapper on std::exception.
|
inlineexplicit |
Create a new instance of class system_exception.
information | (optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_. |
|
inlineexplicit |
Create a new instance of class system_exception.
message | Message string associate to the exception. |
information | (optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_. |
|
inline |
Create a new instance of class system_exception.
message | Message string associate to the exception. |
error | Error code associate to the exception. |
information | (optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_. |
|
inline |
Create a new instance of class system_exception.
message | Message string associate to the exception. |
help_link | Help link string associate to the exception. |
information | (optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_. |
|
inline |
Create a new instance of class system_exception.
message | Message string associate to the exception. |
error | Error code associate to the exception. |
help_link | Help link string associate to the exception. |
information | (optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_. |
|
inlineexplicit |
Create a new instance of class system_exception.
inner_exception | The exception that is the cause of the current exception. |
information | (optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_. |
|
inline |
Create a new instance of class system_exception.
message | Message string associate to the exception. |
inner_exception | The exception that is the cause of the current exception. |
information | (optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_. |
|
inline |
Create a new instance of class system_exception.
message | Message string associate to the exception. |
inner_exception | The exception that is the cause of the current exception. |
error | Error code associate to the exception. |
information | (optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_. |
|
inline |
Create a new instance of class system_exception.
message | Message string associate to the exception. |
inner_exception | The exception that is the cause of the current exception. |
help_link | Help link string associate to the exception. |
information | (optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_. |
|
inline |
Create a new instance of class system_exception.
message | Message string associate to the exception. |
inner_exception | The exception that is the cause of the current exception. |
error | Error code associate to the exception. |
help_link | Help link string associate to the exception. |
information | (optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_. |
|
inlinestatic |
Gets or sets if the generation of the stack trace is enabled.
|
inlinevirtualnoexcept |
Get error associate to the exception.
|
inlinevirtualnoexcept |
Get file path where exception occurred.
|
inlinevirtualnoexcept |
Gets a link to the help file associated with this exception.
|
inlinevirtualnoexcept |
Gets the exception instance that caused the current exception.
|
inlinevirtualnoexcept |
Get Line number where the exception occurred.
|
inlinevirtualnoexcept |
Get file member where exception occurred.
|
inlinevirtualnoexcept |
Get message associate to the exception.
|
inlinevirtualnoexcept |
Get full class name the exception.
|
inlinevirtualnoexcept |
Gets a string representation of the immediate frames on the call stack.
|
overridevirtualnoexcept |
Returns a string that represents the current exception.
Reimplemented from xtd::object.
|
inlineoverridenoexcept |
Get message associate to the exception.