xtd 0.2.0
xtd::tunit::assert_error Class Reference

Definition

Exception thow when an assertion failed.

Namespace
xtd::tunit
Library
xtd.tunit

Constructors

 assert_error (const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class assert_error. More...
 
 assert_error (const xtd::ustring &message, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class assert_error. More...
 
 assert_error (const xtd::ustring &message, const std::error_code &error, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class assert_error. More...
 
 assert_error (const xtd::ustring &message, const xtd::ustring &help_link, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class assert_error. More...
 
 assert_error (const xtd::ustring &message, const std::error_code &error, const xtd::ustring &help_link, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class assert_error. More...
 
 assert_error (const std::exception &inner_exception, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class assert_error. More...
 
 assert_error (const xtd::ustring &message, const std::exception &inner_exception, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class assert_error. More...
 
 assert_error (const xtd::ustring &message, const std::exception &inner_exception, const std::error_code &error, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class assert_error. More...
 
 assert_error (const xtd::ustring &message, const std::exception &inner_exception, const xtd::ustring &help_link, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class assert_error. More...
 
 assert_error (const xtd::ustring &message, const std::exception &inner_exception, const std::error_code &error, const xtd::ustring &help_link, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class assert_error. More...
 

Additional Inherited Members

- Public Types inherited from xtd::system_exception
using exception_ref = std::optional< std::reference_wrapper< const std::exception > >
 Optional reference wrapper on std::exception. More...
 
- Public Member Functions inherited from xtd::system_exception
 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...
 
virtual const xtd::ustringfile_path () const noexcept
 Gets file path where exception occurred. More...
 
virtual const xtd::ustringhelp_link () const noexcept
 Gets a link to the help file associated with this exception. More...
 
virtual std::error_code error_code () const noexcept
 Gets error associate to the exception. More...
 
virtual exception_ref inner_exception () const noexcept
 Gets the exception instance that caused the current exception. More...
 
virtual uint32 line_number () const noexcept
 Gets Line number where the exception occurred. More...
 
virtual const xtd::ustringmember_name () const noexcept
 Gets file member where exception occurred. More...
 
virtual const xtd::ustringmessage () const noexcept
 Gets message associate to the exception. More...
 
virtual const xtd::ustringname () const noexcept
 Gets 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
 Gets 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...
 
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 Public Member Functions inherited from xtd::system_exception
static bool enable_stack_trace () noexcept
 Gets or sets if the generation of the stack trace is enabled. More...
 
static void enable_stack_trace (bool enable) noexcept
 
- 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...
 

Constructor & Destructor Documentation

◆ assert_error() [1/10]

xtd::tunit::assert_error::assert_error ( const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty())
inline

Create a new instance of class assert_error.

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.

◆ assert_error() [2/10]

xtd::tunit::assert_error::assert_error ( const xtd::ustring message,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlineexplicit

Create a new instance of class assert_error.

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_.

◆ assert_error() [3/10]

xtd::tunit::assert_error::assert_error ( const xtd::ustring message,
const std::error_code &  error,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlineexplicit

Create a new instance of class assert_error.

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_.

◆ assert_error() [4/10]

xtd::tunit::assert_error::assert_error ( const xtd::ustring message,
const xtd::ustring help_link,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlineexplicit

Create a new instance of class assert_error.

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_.

◆ assert_error() [5/10]

xtd::tunit::assert_error::assert_error ( const xtd::ustring message,
const std::error_code &  error,
const xtd::ustring help_link,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlineexplicit

Create a new instance of class assert_error.

Parameters
messageMessage string associate to the exception.
errorError code associate to the exception.
help_linkHelp link string associate to the exception.

◆ assert_error() [6/10]

xtd::tunit::assert_error::assert_error ( const std::exception &  inner_exception,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlineexplicit

Create a new instance of class assert_error.

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.

◆ assert_error() [7/10]

xtd::tunit::assert_error::assert_error ( const xtd::ustring message,
const std::exception &  inner_exception,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlineexplicit

Create a new instance of class assert_error.

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_.

◆ assert_error() [8/10]

xtd::tunit::assert_error::assert_error ( const xtd::ustring message,
const std::exception &  inner_exception,
const std::error_code &  error,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlineexplicit

Create a new instance of class assert_error.

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_.

◆ assert_error() [9/10]

xtd::tunit::assert_error::assert_error ( const xtd::ustring message,
const std::exception &  inner_exception,
const xtd::ustring help_link,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlineexplicit

Create a new instance of class assert_error.

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_.

◆ assert_error() [10/10]

xtd::tunit::assert_error::assert_error ( const xtd::ustring message,
const std::exception &  inner_exception,
const std::error_code &  error,
const xtd::ustring help_link,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlineexplicit

Create a new instance of class assert_error.

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_.

The documentation for this class was generated from the following file: