Asposecpplib

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_Exceptionoperator-> () 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...
 
- Public Member Functions inherited from System::ExceptionWrapperBase
 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::TypeInfoType ()
 Shortcut to get System::TypeInfo object for the Exception type. More...
 

Static Public Attributes

static ExceptionWrapper< Details_ExceptionNullException
 Null-instance. More...
 

Protected Member Functions

 ExceptionWrapper (Details_Exception *ptr)
 Constructs a instance of ExceptionWrapper class that contains passed instance. More...
 

Additional Inherited Members

- Protected Attributes inherited from System::ExceptionWrapperBase
ExceptionPtr m_ptr
 Pointer to real Exception class. More...
 

Detailed Description

Template class specialization for Exception class.

Member Typedef Documentation

◆ ExceptionType

Constructor & Destructor Documentation

◆ ExceptionWrapper() [1/7]

Constructs a null-instance of ExceptionWrapper class that does not represent any exception.

◆ ExceptionWrapper() [2/7]

◆ ExceptionWrapper() [3/7]

Constructs a instance of ExceptionWrapper class that contains passed pointer.

Parameters
ptrSmart pointer to the instance of Exception class.

◆ ExceptionWrapper() [4/7]

Constructs an instance of ExceptionWrapper class and pass parameters to Exception class constructor.

Parameters
messageString that contains the error destription

◆ ExceptionWrapper() [5/7]

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.

Parameters
messageString that contains the error destription
innerExceptionA reference to the exception object interpreted as a cause for the exception represented by the Exception being constructed

◆ ExceptionWrapper() [6/7]

Constructs an instance of ExceptionWrapper class and pass parameters to Exception class constructor.

Parameters
infoSerializationInfo object holding serialized exception.
contextStreaming context bound to serialization info passed.

◆ ExceptionWrapper() [7/7]

Constructs a instance of ExceptionWrapper class that contains passed instance.

Parameters
ptrRaw pointer to the instance of Exception class.

Member Function Documentation

◆ operator new()

static void* System::ExceptionWrapper< Details_Exception >::operator new ( std::size_t  )
staticdelete

◆ operator new[]()

static void* System::ExceptionWrapper< Details_Exception >::operator new[] ( std::size_t  )
staticdelete

◆ operator SharedPtr< Object >()

Implicit cast operator to SharedPtr<Object>

◆ operator->()

Allows to access members of the Exception object.

Returns
Raw pointer to the Exception object.
Exceptions
System::NullReferenceExceptionif pointer is null.

◆ Throw()

void System::ExceptionWrapper< Details_Exception >::Throw ( ) const

Method that must be called in catch blocks to rethrow exception.

Exceptions
System::NullReferenceExceptionif pointer is null.

◆ Type()

static const System::TypeInfo& System::ExceptionWrapper< Details_Exception >::Type ( )
static

Shortcut to get System::TypeInfo object for the Exception type.

Returns
Const reference to TypeInfo structure which describes Exception type.

Member Data Documentation

◆ NullException