xtd 0.2.0
Loading...
Searching...
No Matches
xtd::system_exception Class Reference
Inheritance diagram for xtd::system_exception:
xtd::object xtd::access_violation_exception 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::interrupt_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::out_of_memory_exception xtd::security::security_exception xtd::software_termination_exception xtd::threading::abandoned_mutex_exception xtd::threading::barrier_post_phase_exception xtd::threading::lock_recursion_exception xtd::threading::semaphore_full_exception xtd::threading::synchronization_lock_exception xtd::threading::thread_abort_exception xtd::threading::thread_interrupted_exception xtd::threading::thread_state_exception xtd::threading::wait_handle_cannot_be_opened_exception xtd::time_zone_not_found_exception xtd::timeout_exception xtd::tunit::abort_error xtd::tunit::assert_error xtd::tunit::ignore_error xtd::unauthorized_access_exception xtd::uri_template_match_exception xtd::xml_syntax_exception

Definition

Public Aliases

using exception_ref = std::optional< std::reference_wrapper< const std::exception > >
 Optional reference wrapper on std::exception.
 

Public Constructors

 system_exception (const xtd::diagnostics::stack_frame &information=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class system_exception.
 
 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.
 
 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.
 
 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.
 
 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.
 
 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.
 
 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.
 
 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.
 
 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.
 
 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.
 

Public Properties

virtual const xtd::ustringfile_path () const noexcept
 Gets file path where exception occurred.
 
virtual const xtd::ustringhelp_link () const noexcept
 Gets a link to the help file associated with this exception.
 
virtual std::error_code error_code () const noexcept
 Gets error associate to the exception.
 
virtual exception_ref inner_exception () const noexcept
 Gets the exception instance that caused the current exception.
 
virtual uint32 line_number () const noexcept
 Gets Line number where the exception occurred.
 
virtual const xtd::ustringmember_name () const noexcept
 Gets file member where exception occurred.
 
virtual const xtd::ustringmessage () const noexcept
 Gets message associate to the exception.
 
virtual const xtd::ustringname () const noexcept
 Gets full class name the exception.
 
virtual xtd::ustring stack_trace () const noexcept
 Gets a string representation of the immediate frames on the call stack.
 

Public Methods

xtd::ustring to_string () const noexcept override
 Returns a string that represents the current exception.
 
const char * what () const noexcept override
 Gets message associate to the exception.
 

Public Static Methods

static bool enable_stack_trace () noexcept
 Gets if the generation of the stack trace is enabled.
 
static void enable_stack_trace (bool enable) noexcept
 Sets if the generation of the stack trace is enabled. @paran enable triue if stack trace enabled; otherwhise false.
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object.
 
virtual size_t 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<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const noexcept
 Creates a shallow copy of the current object.
 
- 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.
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 

Member Typedef Documentation

◆ exception_ref

using xtd::system_exception::exception_ref = std::optional<std::reference_wrapper<const std::exception> >

Optional reference wrapper on std::exception.

Constructor & Destructor Documentation

◆ system_exception() [1/10]

xtd::system_exception::system_exception ( const xtd::diagnostics::stack_frame information = xtd::diagnostics::stack_frame::empty())
inlineexplicit

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_.
Remarks
Message is set with the default message associate to the exception.

◆ system_exception() [2/10]

xtd::system_exception::system_exception ( const xtd::ustring message,
const xtd::diagnostics::stack_frame information = xtd::diagnostics::stack_frame::empty() 
)
inlineexplicit

Create a new instance of class system_exception.

Parameters
messageMessage 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]

xtd::system_exception::system_exception ( const xtd::ustring message,
const std::error_code &  error,
const xtd::diagnostics::stack_frame information = xtd::diagnostics::stack_frame::empty() 
)
inline

Create a new instance of class system_exception.

Parameters
messageMessage string associate to the exception.
errorError 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]

xtd::system_exception::system_exception ( const xtd::ustring message,
const xtd::ustring help_link,
const xtd::diagnostics::stack_frame information = xtd::diagnostics::stack_frame::empty() 
)
inline

Create a new instance of class system_exception.

Parameters
messageMessage string associate to the exception.
help_linkHelp 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]

xtd::system_exception::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() 
)
inline

Create a new instance of class system_exception.

Parameters
messageMessage string associate to the exception.
errorError code associate to the exception.
help_linkHelp 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]

xtd::system_exception::system_exception ( const std::exception &  inner_exception,
const xtd::diagnostics::stack_frame information = xtd::diagnostics::stack_frame::empty() 
)
inlineexplicit

Create a new instance of class system_exception.

Parameters
inner_exceptionThe 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_.
Remarks
Message is set with the default message associate to the exception.

◆ system_exception() [7/10]

xtd::system_exception::system_exception ( const xtd::ustring message,
const std::exception &  inner_exception,
const xtd::diagnostics::stack_frame information = xtd::diagnostics::stack_frame::empty() 
)
inline

Create a new instance of class system_exception.

Parameters
messageMessage string associate to the exception.
inner_exceptionThe 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]

xtd::system_exception::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() 
)
inline

Create a new instance of class system_exception.

Parameters
messageMessage string associate to the exception.
inner_exceptionThe exception that is the cause of the current exception.
errorError 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]

xtd::system_exception::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() 
)
inline

Create a new instance of class system_exception.

Parameters
messageMessage string associate to the exception.
inner_exceptionThe exception that is the cause of the current exception.
help_linkHelp 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]

xtd::system_exception::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() 
)
inline

Create a new instance of class system_exception.

Parameters
messageMessage string associate to the exception.
inner_exceptionThe exception that is the cause of the current exception.
errorError code associate to the exception.
help_linkHelp 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_.

Member Function Documentation

◆ enable_stack_trace() [1/2]

static bool xtd::system_exception::enable_stack_trace ( )
staticnoexcept

Gets if the generation of the stack trace is enabled.

Returns
triue if stack trace enabled; otherwhise false.

◆ enable_stack_trace() [2/2]

static void xtd::system_exception::enable_stack_trace ( bool  enable)
staticnoexcept

Sets if the generation of the stack trace is enabled. @paran enable triue if stack trace enabled; otherwhise false.

◆ 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
barrier.cpp, default_trace_listener.cpp, and file_info_move_to.cpp.

◆ name()

virtual const xtd::ustring & xtd::system_exception::name ( ) const
virtualnoexcept

Gets full class name the exception.

Returns
A string represent a full class name of the exception

◆ 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()

xtd::ustring xtd::system_exception::to_string ( ) const
overridevirtualnoexcept

Returns a string that represents the current exception.

Returns
A string that represents the current exception.

Reimplemented from xtd::object.

◆ 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: