Class ModelError
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
exception
ExceptionThe exception.
Exceptions
- ArgumentNullException
The
exception
parameter is null.
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
Exceptions
- ArgumentNullException
The
exception
parameter is null.
ModelError(string)
Initializes a new instance of the ModelError class by using the specified error message.
public ModelError(string errorMessage)
Parameters
errorMessage
stringThe 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.