Edit

Share via


ExceptionHandler Constructor

Definition

Initializes a new instance of the ExceptionHandler class with the specified parameters.

public:
 ExceptionHandler(int tryOffset, int tryLength, int filterOffset, int handlerOffset, int handlerLength, System::Reflection::ExceptionHandlingClauseOptions kind, int exceptionTypeToken);
public ExceptionHandler (int tryOffset, int tryLength, int filterOffset, int handlerOffset, int handlerLength, System.Reflection.ExceptionHandlingClauseOptions kind, int exceptionTypeToken);
new System.Reflection.Emit.ExceptionHandler : int * int * int * int * int * System.Reflection.ExceptionHandlingClauseOptions * int -> System.Reflection.Emit.ExceptionHandler
Public Sub New (tryOffset As Integer, tryLength As Integer, filterOffset As Integer, handlerOffset As Integer, handlerLength As Integer, kind As ExceptionHandlingClauseOptions, exceptionTypeToken As Integer)

Parameters

tryOffset
Int32

The byte offset of the first instruction protected by this exception handler.

tryLength
Int32

The number of bytes protected by this exception handler.

filterOffset
Int32

The byte offset of the beginning of the filter code. The filter code ends at the first instruction of the handler block. For non-filter exception handlers, specify 0 (zero) for this parameter.

handlerOffset
Int32

The byte offset of the first instruction of this exception handler.

handlerLength
Int32

The number of bytes in this exception handler.

kind
ExceptionHandlingClauseOptions

One of the enumeration values that specifies the kind of exception handler.

exceptionTypeToken
Int32

The token of the exception type handled by this exception handler. If not applicable, specify 0 (zero).

Exceptions

tryOffset, filterOffset, handlerOffset, tryLength, or handlerLength are negative.

Applies to