Partager via


TransactionFailedException Constructor (String, Exception)

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

Namespace: Microsoft.SpecExplorer.Runtime.Testing
Assembly: Microsoft.SpecExplorer.Runtime (in Microsoft.SpecExplorer.Runtime.dll)

Usage

'Usage

Syntax

'Declaration
public TransactionFailedException (
    string message,
    Exception innerException
)

Parameters

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

Remarks

This constructor initializes the Message property of the new instance to message.

An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor, or null if the innerException parameter does not supply the inner exception value to the constructor.

Platforms

Development Platforms

Microsoft Windows 7, Microsoft Windows Vista, Microsoft Windows XP SP2 or later, Microsoft Windows Server 2008, Microsoft Windows Server 2003

See Also

Reference

TransactionFailedException Class
TransactionFailedException Members
Microsoft.SpecExplorer.Runtime.Testing Namespace