Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace:   System.Web.Http.Results
Assembly:  System.Web.Http (in System.Web.Http.dll)
Overload List
| Name | Description | |
|---|---|---|
| .jpeg) | ExceptionResult(Exception, ApiController) | Initializes a new instance of the ExceptionResult class. | 
| .jpeg) | ExceptionResult(Exception, Boolean, IContentNegotiator, HttpRequestMessage, IEnumerable<MediaTypeFormatter>) | Initializes a new instance of the ExceptionResult class. | 
See Also
ExceptionResult Class
System.Web.Http.Results Namespace
Return to top
ExceptionResult Constructor (Exception, ApiController)
Initializes a new instance of the ExceptionResult class.
Syntax
public ExceptionResult(
    Exception exception,
    ApiController controller
)
public:
ExceptionResult(
    Exception^ exception,
    ApiController^ controller
)
new : 
        exception:Exception *
        controller:ApiController -> ExceptionResult
Public Sub New (
    exception As Exception,
    controller As ApiController
)
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. 
Return to top
ExceptionResult Constructor (Exception, Boolean, IContentNegotiator, HttpRequestMessage, IEnumerable<MediaTypeFormatter>)
Initializes a new instance of the ExceptionResult class.
Syntax
public ExceptionResult(
    Exception exception,
    bool includeErrorDetail,
    IContentNegotiator contentNegotiator,
    HttpRequestMessage request,
    IEnumerable<MediaTypeFormatter> formatters
)
public:
ExceptionResult(
    Exception^ exception,
    bool includeErrorDetail,
    IContentNegotiator^ contentNegotiator,
    HttpRequestMessage^ request,
    IEnumerable<MediaTypeFormatter^>^ formatters
)
new : 
        exception:Exception *
        includeErrorDetail:bool *
        contentNegotiator:IContentNegotiator *
        request:HttpRequestMessage *
        formatters:IEnumerable<MediaTypeFormatter> -> ExceptionResult
Public Sub New (
    exception As Exception,
    includeErrorDetail As Boolean,
    contentNegotiator As IContentNegotiator,
    request As HttpRequestMessage,
    formatters As IEnumerable(Of MediaTypeFormatter)
)
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. 
Return to top