Delen via


HttpError Constructors

Definition

Overloads

HttpError()

Initializes a new instance of the HttpError class.

HttpError(String)

Initializes a new instance of the HttpError class containing error message message.

HttpError(ModelStateDictionary, Boolean)

Initializes a new instance of the HttpError class for modelState.

HttpError(Exception, Boolean)

Initializes a new instance of the HttpError class for exception.

HttpError()

Source:
HttpError.cs
Source:
HttpError.cs

Initializes a new instance of the HttpError class.

public HttpError ();
Public Sub New ()

Applies to

HttpError(String)

Source:
HttpError.cs
Source:
HttpError.cs

Initializes a new instance of the HttpError class containing error message message.

public HttpError (string message);
new System.Web.Http.HttpError : string -> System.Web.Http.HttpError
Public Sub New (message As String)

Parameters

message
String

The error message to associate with this instance.

Applies to

HttpError(ModelStateDictionary, Boolean)

Source:
HttpError.cs
Source:
HttpError.cs

Initializes a new instance of the HttpError class for modelState.

public HttpError (Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, bool includeErrorDetail);
new System.Web.Http.HttpError : Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary * bool -> System.Web.Http.HttpError
Public Sub New (modelState As ModelStateDictionary, includeErrorDetail As Boolean)

Parameters

modelState
ModelStateDictionary

The invalid model state to use for error information.

includeErrorDetail
Boolean

true to include exception messages in the error; false otherwise.

Applies to

HttpError(Exception, Boolean)

Source:
HttpError.cs
Source:
HttpError.cs

Initializes a new instance of the HttpError class for exception.

public HttpError (Exception exception, bool includeErrorDetail);
new System.Web.Http.HttpError : Exception * bool -> System.Web.Http.HttpError
Public Sub New (exception As Exception, includeErrorDetail As Boolean)

Parameters

exception
Exception

The exception to use for error information.

includeErrorDetail
Boolean

true to include the exception information in the error;false otherwise.

Applies to