CorDebugEHClause 結構CorDebugEHClause Structure

[.NET Framework 4.5.2 與更新版本提供支援][Supported in the .NET Framework 4.5.2 and later versions]

代表中繼語言 (IL) 程式碼給定片段的例外狀況處理 (EH) 子句。Represents an exception handling (EH) clause for a given piece of intermediate language (IL) code.

語法Syntax

typedef struct _CorDebugEHClause {  
   ULONG32 Flags;  
   ULONG32 TryOffset;  
   ULONG32 TryLength;  
   ULONG32 HandlerOffset;  
   ULONG32 HandlerLength;  
   ULONG32 ClassToken;  
   ULONG32 FilterOffset;  
} CorDebugEHClause;  

成員Members

memberMember 描述Description
Flags 描述 EH 子句中之例外狀況資訊的位元欄位。A bit field that describes the exception information in the EH clause. 如需詳細資訊,請參閱<備註>一節。For more information, see the Remarks section.
TryOffset try 區塊從方法主體開頭位移的位元組數。The offset, in bytes, of the try block from the start of the method body.
TryLength try 區塊的長度 (位元組)。The length, in bytes, of the try block.
HandlerOffset try 區塊之處理常式的位置。The location of the handler for this try block.
HandlerLength 處理常式程式碼的大小 (位元組)。The size of the handler code in bytes.
ClassToken 以類型為基礎之例外狀況處理常式的中繼資料 Token。The metadata token for a type-based exception handler.
FilterOffset 以篩選器為基礎之例外狀況處理常式自方法主體開頭位移的位元組數。The offset, in bytes, from the start of the method body for a filter-based exception handler.

備註Remarks

CoreDebugEHClause GetEHClauses方法會傳回值的陣列。An array of CoreDebugEHClause values is returned by the GetEHClauses method.

EH 子句資訊以 CLI 規格定義。The EH clause information is defined by the CLI specification. 如需詳細資訊,請參閱 標準 ECMA-355:通用語言基礎結構 (CLI) ,第6版For more information, see Standard ECMA-355: Common Language Infrastructure (CLI), 6th Edition.

flags 欄位可以包含下列旗標。The flags field can contain the following flags. 請注意,CorDebug.idl 或 CorDebug.h 中並未定義這些旗標。Note that they are not defined in CorDebug.idl or CorDebug.h.

旗標Flag Value 描述Description
COR_ILEXCEPTION_CLAUSE_EXCEPTION 0x000000000x00000000 宣告類型的例外狀況子句。A typed exception clause.
COR_ILEXCEPTION_CLAUSE_FILTER 0x000000010x00000001 例外狀況篩選器與處理常式子句。An exception filter and handler clause.
COR_ILEXCEPTION_CLAUSE_FINALLY 0x000000020x00000002 finally 子句。A finally clause.
COR_ILEXCEPTION_CLAUSE_FAULT 0x000000040x00000004 錯誤子句 (finally 子句只會在擲出例外狀況時呼叫)。A fault clause (a finally clause that is called only when an exception is thrown).

規格需求Requirements

平台: 請參閱 系統需求Platforms: See System Requirements.

標頭: CorDebug.idl、CorDebug.hHeader: CorDebug.idl, CorDebug.h

程式庫: CorGuids.libLibrary: CorGuids.lib

.NET Framework 版本:自 4.5.2 起可用Available since 4.5.2.NET Framework Versions: 自 4.5.2 起可用Available since 4.5.2

另請參閱See also