Share via


IVsLanguageDebugInfo2.QueryCatchLineSpan Method

Determines the span of the catch block in a try/catch exception handler for a specified location.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)

Syntax

'Declaration
Function QueryCatchLineSpan ( _
    pBuffer As IVsTextBuffer, _
    iLine As Integer, _
    iCol As Integer, _
    <OutAttribute> ByRef pfIsInCatch As Integer, _
    <OutAttribute> ptsCatchLine As TextSpan() _
) As Integer
int QueryCatchLineSpan(
    IVsTextBuffer pBuffer,
    int iLine,
    int iCol,
    out int pfIsInCatch,
    TextSpan[] ptsCatchLine
)
int QueryCatchLineSpan(
    [InAttribute] IVsTextBuffer^ pBuffer, 
    [InAttribute] int iLine, 
    [InAttribute] int iCol, 
    [OutAttribute] int% pfIsInCatch, 
    [OutAttribute] array<TextSpan>^ ptsCatchLine
)
abstract QueryCatchLineSpan : 
        pBuffer:IVsTextBuffer * 
        iLine:int * 
        iCol:int * 
        pfIsInCatch:int byref * 
        ptsCatchLine:TextSpan[] byref -> int
function QueryCatchLineSpan(
    pBuffer : IVsTextBuffer, 
    iLine : int, 
    iCol : int, 
    pfIsInCatch : int, 
    ptsCatchLine : TextSpan[]
) : int

Parameters

  • iLine
    Type: System.Int32

    [in] The line in which to find the catch block.

  • iCol
    Type: System.Int32

    [in] The column in which to find the catch block

  • pfIsInCatch
    Type: System.Int32%

    [out] Flag indicating whether position is in the catch block. Value is non-zero if the position is in the catch block itself; otherwise, returns zero.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

Use this method to locate the catch block associated with the given position. The location is typically in the try, finally, or catch block. This method does not attempt to find an associated catch block in another method or another file.

.NET Framework Security

See Also

Reference

IVsLanguageDebugInfo2 Interface

Microsoft.VisualStudio.TextManager.Interop Namespace