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
exceptionExceptionThe exception.
Exceptions
- ArgumentNullException
The
exceptionparameter 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
exceptionparameter is null.
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.