ExceptionRegionEncoder.AddCatch 方法

定義

加入錯誤子句。

public:
 System::Reflection::Metadata::Ecma335::ExceptionRegionEncoder AddCatch(int tryOffset, int tryLength, int handlerOffset, int handlerLength, System::Reflection::Metadata::EntityHandle catchType);
public System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder AddCatch (int tryOffset, int tryLength, int handlerOffset, int handlerLength, System.Reflection.Metadata.EntityHandle catchType);
member this.AddCatch : int * int * int * int * System.Reflection.Metadata.EntityHandle -> System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder
Public Function AddCatch (tryOffset As Integer, tryLength As Integer, handlerOffset As Integer, handlerLength As Integer, catchType As EntityHandle) As ExceptionRegionEncoder

參數

tryOffset
Int32

請嘗試區塊開始位移。

tryLength
Int32

請嘗試區塊長度。

handlerOffset
Int32

處理常式開始位移。

handlerLength
Int32

處理常式長度。

傳回

下一個子句的編碼器。

例外狀況

catchType 無效。

tryOffsettryLengthhandlerOffsethandlerLength 超出範圍。

方法主體未宣告為有例外狀況區域。

適用於