Defines the base class for predefined exceptions in the xtd namespace.
- Namespace
- xtd
- Library
- xtd.core
- Examples:
- application_and_exception.cpp, default_trace_listener.cpp, enum_class_parse.cpp, exception_box.cpp, exception_dialog.cpp, exception_ptr.cpp, file_info.cpp, file_info_move_to.cpp, file_info_replace.cpp, format_exception.cpp, iobservable_iobserver.cpp, ip_address.cpp, lock.cpp, monitor.cpp, parse_boolean.cpp, parse_enum.cpp, parse_enum_class.cpp, parse_enum_struct.cpp, parse_floating_point.cpp, parse_numeric.cpp, stack_frame.cpp, stack_trace_simple.cpp, stopwatch.cpp, and system_exception.cpp.
|
using | exception_ref = std::optional< std::reference_wrapper< const std::exception > > |
| Optional reference wrapper on std::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 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 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::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 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::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 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::ustring &help_link, const xtd::diagnostics::stack_frame &information=xtd::diagnostics::stack_frame::empty()) |
| Create a new instance of class system_exception. More...
|
|
|
xtd::ustring | to_string () const noexcept override |
| Returns a string that represents the current exception. More...
|
|
const char * | what () const noexcept override |
| Gets message associate to the exception. More...
|
|
|
| object ()=default |
| Create a new instance of the ultimate base class object. More...
|
|
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...
|
|
virtual type_object | get_type () const noexcept |
| Gets the type of the current instance. More...
|
|
template<typename object_t > |
std::unique_ptr< object_t > | memberwise_clone () const noexcept |
| Creates a shallow copy of the current object. More...
|
|
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...
|
|
◆ exception_ref
Optional reference wrapper on std::exception.
◆ system_exception() [1/10]
Create a new instance of class system_exception.
- Parameters
-
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_. |
◆ system_exception() [2/10]
Create a new instance of class system_exception.
- Parameters
-
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_. |
◆ system_exception() [3/10]
Create a new instance of class system_exception.
- Parameters
-
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_. |
◆ system_exception() [4/10]
Create a new instance of class system_exception.
- Parameters
-
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_. |
◆ system_exception() [5/10]
Create a new instance of class system_exception.
- Parameters
-
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_. |
◆ system_exception() [6/10]
Create a new instance of class system_exception.
- Parameters
-
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_. |
◆ system_exception() [7/10]
Create a new instance of class system_exception.
- Parameters
-
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_. |
◆ system_exception() [8/10]
Create a new instance of class system_exception.
- Parameters
-
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_. |
◆ system_exception() [9/10]
Create a new instance of class system_exception.
- Parameters
-
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_. |
◆ system_exception() [10/10]
Create a new instance of class system_exception.
- Parameters
-
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_. |
◆ enable_stack_trace()
static bool xtd::system_exception::enable_stack_trace |
( |
| ) |
|
|
staticnoexcept |
Gets or sets if the generation of the stack trace is enabled.
◆ error_code()
virtual std::error_code xtd::system_exception::error_code |
( |
| ) |
const |
|
virtualnoexcept |
Gets error associate to the exception.
- Returns
- An error_code represent a Error associate to the exception
◆ file_path()
virtual const xtd::ustring& xtd::system_exception::file_path |
( |
| ) |
const |
|
virtualnoexcept |
Gets file path where exception occurred.
- Returns
- A string represent file path where exception occurred
◆ help_link()
virtual const xtd::ustring& xtd::system_exception::help_link |
( |
| ) |
const |
|
virtualnoexcept |
Gets a link to the help file associated with this exception.
- Returns
- A string represent a link to Help file associated with exception
◆ inner_exception()
virtual exception_ref xtd::system_exception::inner_exception |
( |
| ) |
const |
|
virtualnoexcept |
Gets the exception instance that caused the current exception.
- Returns
- An instance of exception that describes the error that caused the current exception. The inner_exception property returns the same value as was passed into the constructor, or a null reference if the inner exception value was not supplied to the constructor.
◆ line_number()
virtual uint32 xtd::system_exception::line_number |
( |
| ) |
const |
|
virtualnoexcept |
Gets Line number where the exception occurred.
- Returns
- the line number where exception occurred
◆ member_name()
virtual const xtd::ustring& xtd::system_exception::member_name |
( |
| ) |
const |
|
virtualnoexcept |
Gets file member where exception occurred.
- Returns
- A string represent member name where exception occurred
◆ message()
virtual const xtd::ustring& xtd::system_exception::message |
( |
| ) |
const |
|
virtualnoexcept |
Gets message associate to the exception.
- Returns
- A string represent a massage associate to the exception
- Examples:
- application_and_exception.cpp, as.cpp, console_read.cpp, default_trace_listener.cpp, file_info_move_to.cpp, file_info_replace.cpp, monitor.cpp, parse_boolean.cpp, parse_enum.cpp, parse_enum_class.cpp, parse_enum_struct.cpp, parse_floating_point.cpp, and parse_numeric.cpp.
◆ name()
virtual const xtd::ustring& xtd::system_exception::name |
( |
| ) |
const |
|
virtualnoexcept |
◆ stack_trace()
virtual xtd::ustring xtd::system_exception::stack_trace |
( |
| ) |
const |
|
virtualnoexcept |
Gets a string representation of the immediate frames on the call stack.
- Returns
- A string that describes the immediate frames of the call stack.
- Examples:
- file_info_move_to.cpp.
◆ to_string()
Returns a string that represents the current exception.
- Returns
- A string that represents the current exception.
Reimplemented from xtd::object.
- Examples:
- file_info.cpp.
◆ what()
const char* xtd::system_exception::what |
( |
| ) |
const |
|
overridenoexcept |
Gets message associate to the exception.
- Returns
- A string represent a massage associate to the exception
The documentation for this class was generated from the following file: