IVsLanguageDebugInfo2.QueryCatchLineSpan Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines the span of the catch block in a try/catch exception handler for a specified location.
public:
int QueryCatchLineSpan(Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer ^ pBuffer, int iLine, int iCol, [Runtime::InteropServices::Out] int % pfIsInCatch, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsCatchLine);
int QueryCatchLineSpan(Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer const & pBuffer, int iLine, int iCol, [Runtime::InteropServices::Out] int & pfIsInCatch, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & ptsCatchLine);
public int QueryCatchLineSpan (Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer pBuffer, int iLine, int iCol, out int pfIsInCatch, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] ptsCatchLine);
abstract member QueryCatchLineSpan : Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer * int * int * int * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] -> int
Public Function QueryCatchLineSpan (pBuffer As IVsTextBuffer, iLine As Integer, iCol As Integer, ByRef pfIsInCatch As Integer, ptsCatchLine As TextSpan()) As Integer
Parameters
- pBuffer
- IVsTextBuffer
[in] An IVsTextBuffer object containing the text to examine.
- iLine
- Int32
[in] The line in which to find the catch block.
- iCol
- Int32
[in] The column in which to find the catch block
- pfIsInCatch
- 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.
Returns
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.