ModelError Constructor (Exception, String)

Initializes a new instance of the ModelError class by using the specified exception and error message.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Syntax

'Declaration
Public Sub New ( _
    exception As Exception, _
    errorMessage As String _
)
public ModelError(
    Exception exception,
    string errorMessage
)
public:
ModelError(
    Exception^ exception, 
    String^ errorMessage
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

The exception parameter is null reference (Nothing in Visual Basic).

See Also

Reference

ModelError Class

ModelError Overload

System.Web.Mvc Namespace