Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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)

public ModelError(
	Exception exception,
	string errorMessage
)

Parameters

exception
Type: System.Exception
The exception.
errorMessage
Type: System.String
The error message.

ExceptionCondition
ArgumentNullException

The exception parameter is null.

Show:
© 2015 Microsoft