Asposecpplib
System::ExceptionWrapper< Details_Exception > Class Reference

Template class specialization for Exception class. More...

Inherits System::ExceptionWrapperBase.

Public Types

using ExceptionType = Details_Exception
 Used for casting functions. More...
 

Public Member Functions

ASPOSECPP_SHARED_API operator SharedPtr< Object > ()
 Implicit cast operator to SharedPtr<Object> More...
 
ASPOSECPP_SHARED_API ExceptionWrapper (std::nullptr_t)
 Constructs a null-instance of ExceptionWrapper class that does not represent any exception. More...
 
ASPOSECPP_SHARED_API ExceptionWrapper ()
 Constructs an instance of ExceptionWrapper class. More...
 
ASPOSECPP_SHARED_API ExceptionWrapper (const ExceptionPtr &ptr)
 Constructs a instance of ExceptionWrapper class that contains passed pointer. More...
 
ASPOSECPP_SHARED_API ExceptionWrapper (const String &message)
 Constructs an instance of ExceptionWrapper class and pass parameters to Exception class constructor. More...
 
ASPOSECPP_SHARED_API ExceptionWrapper (const String &message, const ExceptionWrapper< Details_Exception > &innerException)
 Constructs an instance of ExceptionWrapper class and pass parameters to Exception class constructor. More...
 
ASPOSECPP_SHARED_API 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...
 
ASPOSECPP_SHARED_API Details_Exceptionoperator-> () const
 Allows to access members of the Exception object. More...
 
ASPOSECPP_SHARED_API void Throw () const
 Method that must be called in catch blocks to rethrow exception. More...
 
- Public Member Functions inherited from System::ExceptionWrapperBase
ASPOSECPP_SHARED_API ExceptionWrapperBase (std::nullptr_t)
 Constructs a null-instance of ExceptionWrapper that does not represent any exception. More...
 
ASPOSECPP_SHARED_API ExceptionWrapperBase (const ExceptionPtr &ptr)
 Constructs a instance of ExceptionWrapper class that contains. More...
 
virtual ASPOSECPP_SHARED_API 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...
 
ASPOSECPP_SHARED_API bool IsNull () const
 Determines if the current Exception object is a null-object i.e. does not represent any exception. More...
 
ASPOSECPP_SHARED_API bool operator== (const ExceptionWrapperBase &e) const
 Determines if the current and the specified Exception objects are equal. More...
 
ASPOSECPP_SHARED_API 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...
 
ASPOSECPP_SHARED_API bool operator!= (const std::nullptr_t) const
 Determines if the current Exception object is not a null-object i.e. represents an exception. More...
 
ASPOSECPP_SHARED_API bool Equals (const ExceptionWrapperBase &e) const
 Determines if the current and the specified Exception objects are equal. More...
 
ASPOSECPP_SHARED_API bool Is (const System::TypeInfo &target) const
 Checks if exception object is of specific type or its child type. Follows C# 'is' semantics. More...
 
ASPOSECPP_SHARED_API int GetHashCode () const
 Calls GetHashCode() on exception pointer. More...
 
ASPOSECPP_SHARED_API 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 ASPOSECPP_SHARED_API System::TypeInfoType ()
 Shortcut to get System::TypeInfo object for the Exception type. More...
 

Detailed Description

Template class specialization for Exception class.

Member Typedef Documentation

◆ ExceptionType

Constructor & Destructor Documentation

◆ ExceptionWrapper() [1/6]

ASPOSECPP_SHARED_API System::ExceptionWrapper< Details_Exception >::ExceptionWrapper ( std::nullptr_t  )

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

◆ ExceptionWrapper() [2/6]

Constructs an instance of ExceptionWrapper class.

◆ ExceptionWrapper() [3/6]

ASPOSECPP_SHARED_API System::ExceptionWrapper< Details_Exception >::ExceptionWrapper ( const ExceptionPtr ptr)

Constructs a instance of ExceptionWrapper class that contains passed pointer.

Parameters
ptrSmart pointer to the instance of Exception class.

◆ ExceptionWrapper() [4/6]

ASPOSECPP_SHARED_API System::ExceptionWrapper< Details_Exception >::ExceptionWrapper ( const String message)

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

Parameters
messageString that contains the error destription

◆ ExceptionWrapper() [5/6]

ASPOSECPP_SHARED_API 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/6]

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.

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

ASPOSECPP_SHARED_API System::ExceptionWrapper< Details_Exception >::operator SharedPtr< Object > ( )

Implicit cast operator to SharedPtr<Object>

◆ operator->()

ASPOSECPP_SHARED_API Details_Exception* System::ExceptionWrapper< Details_Exception >::operator-> ( ) const

Allows to access members of the Exception object.

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

◆ Throw()

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