PostSharp6.5//API Reference/Post­Sharp.​Patterns.​Contracts Namespace/Contract­Exception­Factory Class/Contract­Exception­Factory Methods/Contract­Exception­Factory.​Create­Exception Method

ContractExceptionFactory.CreateException Method

Creates the exception based on the contents of ContractExceptionInfo.

Namespace:  PostSharp.Patterns.Contracts
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.5.4.0 (6.5.4.0)
Syntax
C#
public virtual Exception CreateException(
	ContractExceptionInfo exceptionInfo
)

Parameters

exceptionInfo
Type: PostSharp.Patterns.Contracts.ContractExceptionInfo
Information to be used for the creation of the requested exception.

Return Value

Type: Exception
The requested exception
See Also