Bagikan melalui


UnitTestAssertException Constructor (String, Exception)

Initializes a new instance of the UnitTestAssertException class with a specified error message and a reference to the inner exception that caused this exception.

Namespace:  Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

Syntax

'Declaration
Protected Sub New ( _
    msg As String, _
    ex As Exception _
)
protected UnitTestAssertException(
    string msg,
    Exception ex
)
protected:
UnitTestAssertException(
    String^ msg, 
    Exception^ ex
)
new : 
        msg:string * 
        ex:Exception -> UnitTestAssertException
protected function UnitTestAssertException(
    msg : String, 
    ex : Exception
)

Parameters

  • msg
    Type: System.String
    The error message that explains the reason for the exception.
  • ex
    Type: System.Exception
    The exception that is the cause of the current exception. If the ex parameter is not nulla null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception.

.NET Framework Security

See Also

Reference

UnitTestAssertException Class

UnitTestAssertException Overload

Microsoft.VisualStudio.TestTools.UnitTesting Namespace