Asposecpplib
System::Details_ExceptionWithErrorCode< T, typename > Class Template Reference

The template class for an exception with an error code. More...

Inherits T.

Public Member Functions

virtual int32_t get_ErrorCode () const
 Gets the HRESULT of the error. More...
 
virtual String get_Message () const override
 

Protected Member Functions

 Details_ExceptionWithErrorCode ()
 Initializes a new instance of the ExceptionWithErrorCode class with default properties. More...
 
 Details_ExceptionWithErrorCode (const String &message)
 Initializes a new instance of the ExceptionWithErrorCode class with a specified error message. More...
 
 Details_ExceptionWithErrorCode (const String &message, const System::Exception &innerException)
 Initializes a new instance of the ExceptionWithErrorCode class with a specified error message and a reference to the inner exception that is the cause of this exception. More...
 
 Details_ExceptionWithErrorCode (const String &message, int32_t errorCode)
 Initializes a new instance of the ExceptionWithErrorCode class with a specified error message and the HRESULT of the error. param message he error message that specifies the reason for the exception. param The HRESULT of the error. More...
 
virtual String ExtraDescription () const override
 

Detailed Description

template<typename T, typename = std::enable_if<std::is_base_of<Exception, T>::value>>
class System::Details_ExceptionWithErrorCode< T, typename >

The template class for an exception with an error code.

Template Parameters
TAn exception base class.

Constructor & Destructor Documentation

◆ Details_ExceptionWithErrorCode() [1/4]

template<typename T , typename = std::enable_if<std::is_base_of<Exception, T>::value>>
System::Details_ExceptionWithErrorCode< T, typename >::Details_ExceptionWithErrorCode ( )
inlineprotected

Initializes a new instance of the ExceptionWithErrorCode class with default properties.

◆ Details_ExceptionWithErrorCode() [2/4]

template<typename T , typename = std::enable_if<std::is_base_of<Exception, T>::value>>
System::Details_ExceptionWithErrorCode< T, typename >::Details_ExceptionWithErrorCode ( const String message)
inlineprotected

Initializes a new instance of the ExceptionWithErrorCode class with a specified error message.

Parameters
messageThe error message string.

◆ Details_ExceptionWithErrorCode() [3/4]

template<typename T , typename = std::enable_if<std::is_base_of<Exception, T>::value>>
System::Details_ExceptionWithErrorCode< T, typename >::Details_ExceptionWithErrorCode ( const String message,
const System::Exception innerException 
)
inlineprotected

Initializes a new instance of the ExceptionWithErrorCode class with a specified error message and a reference to the inner exception that is the cause of this exception.

Parameters
messageThe error message that explains the reason for the exception.
innerExceptionThe exception that is the cause of the current exception. If the innerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.

◆ Details_ExceptionWithErrorCode() [4/4]

template<typename T , typename = std::enable_if<std::is_base_of<Exception, T>::value>>
System::Details_ExceptionWithErrorCode< T, typename >::Details_ExceptionWithErrorCode ( const String message,
int32_t  errorCode 
)
inlineprotected

Initializes a new instance of the ExceptionWithErrorCode class with a specified error message and the HRESULT of the error. param message he error message that specifies the reason for the exception. param The HRESULT of the error.

Member Function Documentation

◆ ExtraDescription()

template<typename T , typename = std::enable_if<std::is_base_of<Exception, T>::value>>
virtual String System::Details_ExceptionWithErrorCode< T, typename >::ExtraDescription ( ) const
inlineoverrideprotectedvirtual
See also
System::Exception::ExtraDescription

Reimplemented in System::ComponentModel::Details_Win32Exception.

◆ get_ErrorCode()

template<typename T , typename = std::enable_if<std::is_base_of<Exception, T>::value>>
virtual int32_t System::Details_ExceptionWithErrorCode< T, typename >::get_ErrorCode ( ) const
inlinevirtual

Gets the HRESULT of the error.

◆ get_Message()

template<typename T , typename = std::enable_if<std::is_base_of<Exception, T>::value>>
virtual String System::Details_ExceptionWithErrorCode< T, typename >::get_Message ( ) const
inlineoverridevirtual
See also
System::Exception::get_Message