Share via


ExceptionResult Class

Definition

An action result that returns a Status500InternalServerError response and performs content negotiation on an HttpError based on an Exception.

public class ExceptionResult : Microsoft.AspNetCore.Mvc.ObjectResult
type ExceptionResult = class
    inherit ObjectResult
Public Class ExceptionResult
Inherits ObjectResult
Inheritance
ExceptionResult

Constructors

ExceptionResult(Exception, Boolean)

Initializes a new instance of the ExceptionResult class.

Properties

ContentTypes

Gets or sets the MediaTypeCollection.

(Inherited from ObjectResult)
DeclaredType

Gets or sets the declared type.

(Inherited from ObjectResult)
Exception

Gets the exception to include in the error.

Formatters

The collection of IOutputFormatter.

(Inherited from ObjectResult)
IncludeErrorDetail

Gets a value indicating whether the error should include exception messages.

StatusCode

Gets or sets the HTTP status code.

(Inherited from ObjectResult)
Value

The object result.

(Inherited from ObjectResult)

Methods

ExecuteResult(ActionContext)

Executes the result operation of the action method synchronously. This method is called by MVC to process the result of an action method.

(Inherited from ActionResult)
ExecuteResultAsync(ActionContext)

Executes the result operation of the action method asynchronously. This method is called by MVC to process the result of an action method.

OnFormatting(ActionContext)

This method is called before the formatter writes to the output stream.

(Inherited from ObjectResult)

Applies to