ExceptionRegionEncoder.AddCatch 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
添加错误子句。
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
Try 块初始偏移量。
- tryLength
- Int32
尝试块长度。
- handlerOffset
- Int32
处理程序初始偏移量。
- handlerLength
- Int32
处理程序长度。
返回
下一个子句的编码器。
例外
catchType
无效。
tryOffset
、tryLength
、handlerOffset
或 handlerLength
超出范围。
方法主体未声明为具有异常区域。