COMExceptionHandlerExceptionForHRESULT Method

Creates and returns a new instance of the COMCapeOpenExceptionWrapper class.

Definition

Namespace: CapeOpen
Assembly: CapeOpen (in CapeOpen.dll) Version: 1.0.0.0 (1.0.0.0)
public static Exception ExceptionForHRESULT(
	Object exceptionObject,
	Exception inner
)

Parameters

exceptionObject  Object
The CAPE-OPEN object that raised the error.
inner  Exception
An inner .Net-based exception obtained from the IErrorInfo object, if implemented or an accompanying .Net exception.

Return Value

Exception
The COM-based object that returned the error HRESULT wrapper as the appropriate .Net-based exception.

Remarks

Creates a .Net based exception wrapper for COM-based CAPE-OPEN componets to enable users to utilize .Net structured exception handling. This method ormats the .Net-bsed exception object and the COM-based CAPE-OPEN component to rethrow the COM-based error condition as a .Net-based exception using the wrapper class.

See Also