ExceptionResult Class¶
Summary¶
An action result that returns a @!:StatusCodes.Status500InternalServerError- response and performs content negotiation on an [System.Web.Http.HttpError](System.Web.Http.HttpError.yml) based on an [System.Web.Http.ExceptionResult.Exception](System.Web.Http.ExceptionResult.yml).
Constructors¶
-
ExceptionResult
(System.Exception, System.Boolean)¶ Initializes a new instance of the [System.Web.Http.ExceptionResult](System.Web.Http.ExceptionResult.yml) class.
Arguments: - exception (System.Exception) – The exception to include in the error.
- includeErrorDetail (System.Boolean) – <see langword=”true” /> if the error should include exception messages; otherwise, <see langword=”false” />.
public ExceptionResult(Exception exception, bool includeErrorDetail)
-
Methods¶
-
ExecuteResultAsync
(Microsoft.AspNet.Mvc.ActionContext)¶ Arguments: - context (Microsoft.AspNet.Mvc.ActionContext) –
Return type: System.Threading.Tasks.Task
public override Task ExecuteResultAsync(ActionContext context)
-