IVsLanguageDebugInfo2::QueryCatchLineSpan Method (IVsTextBuffer^, Int32, Int32, Int32, array<TextSpan>^)

 

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)

int QueryCatchLineSpan(
	IVsTextBuffer^ pBuffer,
	int iLine,
	int iCol,
	[OutAttribute] int% pfIsInCatch,
	array<TextSpan>^ ptsCatchLine
)

Parameters

pBuffer
Type: Microsoft.VisualStudio.TextManager.Interop::IVsTextBuffer^

[in] An IVsTextBuffer object containing the text to examine.

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.

ptsCatchLine
Type: array<Microsoft.VisualStudio.TextManager.Interop::TextSpan>^

[out] Returns a TextSpan object describing the span of the catch block.

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

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.

Return to top
Show: