ModelError Constructors

Definition

Overloads

ModelError(Exception)

Initializes a new instance of the ModelError class by using the specified exception.

ModelError(String)

Initializes a new instance of the ModelError class by using the specified error message.

ModelError(Exception, String)

Initializes a new instance of the ModelError class by using the specified exception and error message.

ModelError(Exception)

Initializes a new instance of the ModelError class by using the specified exception.

public ModelError (Exception exception);
new System.Web.Mvc.ModelError : Exception -> System.Web.Mvc.ModelError
Public Sub New (exception As Exception)

Parameters

exception
Exception

The exception.

Exceptions

The exception parameter is null.

Applies to

ModelError(String)

Initializes a new instance of the ModelError class by using the specified error message.

public ModelError (string errorMessage);
new System.Web.Mvc.ModelError : string -> System.Web.Mvc.ModelError
Public Sub New (errorMessage As String)

Parameters

errorMessage
String

The error message.

Applies to

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);
new System.Web.Mvc.ModelError : Exception * string -> System.Web.Mvc.ModelError
Public Sub New (exception As Exception, errorMessage As String)

Parameters

exception
Exception

The exception.

errorMessage
String

The error message.

Exceptions

The exception parameter is null.

Applies to