The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
ExceptionResult Constructor
Namespace:
System.Web.Http.Results
Assembly: System.Web.Http (in System.Web.Http.dll)
| Name | Description | |
|---|---|---|
![]() | ExceptionResult(Exception^, ApiController^) | Initializes a new instance of the ExceptionResult class. |
![]() | ExceptionResult(Exception^, Boolean, IContentNegotiator^, HttpRequestMessage^, IEnumerable<MediaTypeFormatter^>^) | Initializes a new instance of the ExceptionResult class. |
ExceptionResult Constructor (Exception^, ApiController^)
Initializes a new instance of the ExceptionResult class.
Parameters
- exception
-
Type:
System::Exception^
The exception to include in the error.
- controller
-
Type:
System.Web.Http::ApiController^
The controller from which to obtain the dependencies needed for execution.
ExceptionResult Constructor (Exception^, Boolean, IContentNegotiator^, HttpRequestMessage^, IEnumerable<MediaTypeFormatter^>^)
Initializes a new instance of the ExceptionResult class.
public: ExceptionResult( Exception^ exception, bool includeErrorDetail, IContentNegotiator^ contentNegotiator, HttpRequestMessage^ request, IEnumerable<MediaTypeFormatter^>^ formatters )
Parameters
- exception
-
Type:
System::Exception^
The exception to include in the error.
- includeErrorDetail
-
Type:
System::Boolean
true if the error should include exception messages; otherwise, false .
- contentNegotiator
-
Type:
System.Net.Http.Formatting::IContentNegotiator^
The content negotiator to handle content negotiation.
- request
-
Type:
System.Net.Http::HttpRequestMessage^
The request message which led to this result.
- formatters
-
Type:
System.Collections.Generic::IEnumerable<MediaTypeFormatter^>^
The formatters to use to negotiate and format the content.
Show:
