Compartir a través de


GitHttpHandler.HandleException Method

This basic WebService ExceptionHandler captures the exception and records it in the request Context for future logging. Services may choose to over-ride this method, perform some actions based on the exception, changing the exception, eating it or just letting it pass.

Namespace:  Microsoft.TeamFoundation.Git.Server
Assembly:  Microsoft.TeamFoundation.Git.Server (in Microsoft.TeamFoundation.Git.Server.dll)

Syntax

'Declaration
Protected Overrides Function HandleException ( _
    exception As Exception, _
    exceptionHeader As String, _
    statusCode As Integer, _
    responseStarted As Boolean _
) As Exception
protected override Exception HandleException(
    Exception exception,
    string exceptionHeader,
    int statusCode,
    bool responseStarted
)
protected:
virtual Exception^ HandleException(
    Exception^ exception, 
    String^ exceptionHeader, 
    int statusCode, 
    bool responseStarted
) override
abstract HandleException : 
        exception:Exception * 
        exceptionHeader:string * 
        statusCode:int * 
        responseStarted:bool -> Exception  
override HandleException : 
        exception:Exception * 
        exceptionHeader:string * 
        statusCode:int * 
        responseStarted:bool -> Exception
protected override function HandleException(
    exception : Exception, 
    exceptionHeader : String, 
    statusCode : int, 
    responseStarted : boolean
) : Exception

Parameters

  • exceptionHeader
    Type: System.String

    Header to be used to put the exception type in.

  • statusCode
    Type: System.Int32

    HttpStatus code for the response.

  • responseStarted
    Type: System.Boolean

    Has the response started being sent.

Return Value

Type: System.Exception
The resulting exception, the base class returns the exception passed.

.NET Framework Security

See Also

Reference

GitHttpHandler Class

Microsoft.TeamFoundation.Git.Server Namespace