Class ModelError
- Namespace
- System.Web.Http.ModelBinding
- Assembly
- System.Web.Http.dll
Represents an error that occurs during model binding.
public class ModelError
- Inheritance
-
ModelError
- Inherited Members
Constructors
ModelError(Exception)
Initializes a new instance of the ModelError class by using the specified exception.
public ModelError(Exception exception)
Parameters
exceptionExceptionThe exception.
ModelError(Exception, string)
Initializes a new instance of the ModelError class by using the specified exception and error message.
public ModelError(Exception exception, string errorMessage)
Parameters
ModelError(string)
Initializes a new instance of the ModelError class by using the specified error message.
public ModelError(string errorMessage)
Parameters
errorMessagestringThe error message
Properties
ErrorMessage
Gets or sets the error message.
public string ErrorMessage { get; }
Property Value
- string
The error message.
Exception
Gets or sets the exception object.
public Exception Exception { get; }
Property Value
- Exception
The exception object.