Template class specialization for Exception class. More...
Inherits System::ExceptionWrapperBase.
Public Types | |
using | ExceptionType = Details_Exception |
Used for casting functions. More... | |
Public Member Functions | |
operator SharedPtr< Object > () | |
Implicit cast operator to SharedPtr<Object> More... | |
ExceptionWrapper (std::nullptr_t) | |
Constructs a null-instance of ExceptionWrapper class that does not represent any exception. More... | |
ExceptionWrapper () | |
Constructs an instance of ExceptionWrapper class. More... | |
ExceptionWrapper (const ExceptionPtr &ptr) | |
Constructs a instance of ExceptionWrapper class that contains passed pointer. More... | |
ExceptionWrapper (const String &message) | |
Constructs an instance of ExceptionWrapper class and pass parameters to Exception class constructor. More... | |
ExceptionWrapper (const String &message, const ExceptionWrapper< Details_Exception > &innerException) | |
Constructs an instance of ExceptionWrapper class and pass parameters to Exception class constructor. More... | |
ExceptionWrapper (const System::SharedPtr< System::Runtime::Serialization::SerializationInfo > &info, System::Runtime::Serialization::StreamingContext context) | |
Constructs an instance of ExceptionWrapper class and pass parameters to Exception class constructor. More... | |
Details_Exception * | operator-> () const |
Allows to access members of the Exception object. More... | |
void | Throw () const |
Method that must be called in catch blocks to rethrow exception. More... | |
![]() | |
ExceptionWrapperBase (std::nullptr_t) | |
Constructs a null-instance of ExceptionWrapper that does not represent any exception. More... | |
ExceptionWrapperBase (const ExceptionPtr &ptr) | |
Constructs a instance of ExceptionWrapper class that contains. More... | |
virtual const char * | what () const noexcept override |
Calls the exception what() implementation. More... | |
ExceptionPtr | Get () const |
Returns smart pointer to the instance of Exception class that wrapper contains. More... | |
bool | IsNull () const |
Determines if the current Exception object is a null-object i.e. does not represent any exception. More... | |
bool | operator== (const ExceptionWrapperBase &e) const |
Determines if the current and the specified Exception objects are equal. More... | |
bool | operator== (const std::nullptr_t) const |
Determines if the current Exception object is a null-object i.e. does not represent any exception. More... | |
bool | operator!= (const std::nullptr_t) const |
Determines if the current Exception object is not a null-object i.e. represents an exception. More... | |
bool | Equals (const ExceptionWrapperBase &e) const |
Determines if the current and the specified Exception objects are equal. More... | |
bool | Is (const System::TypeInfo &target) const |
Checks if exception object is of specific type or its child type. Follows C# 'is' semantics. More... | |
int | GetHashCode () const |
Calls GetHashCode() on exception pointer. More... | |
String | ToString () const |
Calls ToString() on exception pointer. More... | |
Static Public Member Functions | |
static void * | operator new (std::size_t)=delete |
static void * | operator new[] (std::size_t)=delete |
static const System::TypeInfo & | Type () |
Shortcut to get System::TypeInfo object for the Exception type. More... | |
Static Public Attributes | |
static ExceptionWrapper< Details_Exception > | NullException |
Null-instance. More... | |
Protected Member Functions | |
ExceptionWrapper (Details_Exception *ptr) | |
Constructs a instance of ExceptionWrapper class that contains passed instance. More... | |
Template class specialization for Exception class.
Used for casting functions.
System::ExceptionWrapper< Details_Exception >::ExceptionWrapper | ( | std::nullptr_t | ) |
Constructs a null-instance of ExceptionWrapper class that does not represent any exception.
Constructs an instance of ExceptionWrapper class.
System::ExceptionWrapper< Details_Exception >::ExceptionWrapper | ( | const ExceptionPtr & | ptr | ) |
Constructs a instance of ExceptionWrapper class that contains passed pointer.
ptr | Smart pointer to the instance of Exception class. |
System::ExceptionWrapper< Details_Exception >::ExceptionWrapper | ( | const String & | message | ) |
Constructs an instance of ExceptionWrapper class and pass parameters to Exception class constructor.
message | String that contains the error destription |
System::ExceptionWrapper< Details_Exception >::ExceptionWrapper | ( | const String & | message, |
const ExceptionWrapper< Details_Exception > & | innerException | ||
) |
Constructs an instance of ExceptionWrapper class and pass parameters to Exception class constructor.
message | String that contains the error destription |
innerException | A reference to the exception object interpreted as a cause for the exception represented by the Exception being constructed |
Constructs an instance of ExceptionWrapper class and pass parameters to Exception class constructor.
info | SerializationInfo object holding serialized exception. |
context | Streaming context bound to serialization info passed. |
|
protected |
Constructs a instance of ExceptionWrapper class that contains passed instance.
ptr | Raw pointer to the instance of Exception class. |
|
staticdelete |
|
staticdelete |
System::ExceptionWrapper< Details_Exception >::operator SharedPtr< Object > | ( | ) |
Implicit cast operator to SharedPtr<Object>
Details_Exception* System::ExceptionWrapper< Details_Exception >::operator-> | ( | ) | const |
Allows to access members of the Exception object.
System::NullReferenceException | if pointer is null. |
void System::ExceptionWrapper< Details_Exception >::Throw | ( | ) | const |
Method that must be called in catch blocks to rethrow exception.
System::NullReferenceException | if pointer is null. |
|
static |
Shortcut to get System::TypeInfo object for the Exception type.
|
static |
Null-instance.