Edit

Share via


ModelError Constructors

Definition

Initializes a new instance of the ModelError class.

Overloads

ModelError(Exception)

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

ModelError(String)

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

ModelError(Exception, String)

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

ModelError(Exception)

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

public:
 ModelError(Exception ^ exception);
public ModelError (Exception exception);
new System.Web.ModelBinding.ModelError : Exception -> System.Web.ModelBinding.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 using the specified error message.

public:
 ModelError(System::String ^ errorMessage);
public ModelError (string errorMessage);
new System.Web.ModelBinding.ModelError : string -> System.Web.ModelBinding.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 using the specified exception and error message.

public:
 ModelError(Exception ^ exception, System::String ^ errorMessage);
public ModelError (Exception exception, string errorMessage);
new System.Web.ModelBinding.ModelError : Exception * string -> System.Web.ModelBinding.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