ModelError Constructor
Initializes a new instance of the ModelError class.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
| Name | Description | |
|---|---|---|
![]() | ModelError(Exception) | Initializes a new instance of the ModelError class by using the specified exception. |
![]() | ModelError(Exception, String) | Initializes a new instance of the ModelError class by using the specified exception and error message. |
![]() | ModelError(String) | Initializes a new instance of the ModelError class by using the specified error message. |
ModelError Constructor (Exception)
Initializes a new instance of the ModelError class by using the specified exception.
Parameters
- exception
-
Type:
System.Exception
The exception.
| Exception | Condition |
|---|---|
| ArgumentNullException | The exception parameter is null. |
ModelError Constructor (Exception, String)
Initializes a new instance of the ModelError class by using the specified exception and error message.
Parameters
- exception
-
Type:
System.Exception
The exception.
- errorMessage
-
Type:
System.String
The error message.
| Exception | Condition |
|---|---|
| ArgumentNullException | The exception parameter is null. |
ModelError Constructor (String)
Initializes a new instance of the ModelError class by using the specified error message.
Parameters
- errorMessage
-
Type:
System.String
The error message.
Show:
