Share via


ControlFlowBuilder.AddCatchRegion Método

Definição

Adiciona a região catch.

public:
 void AddCatchRegion(System::Reflection::Metadata::Ecma335::LabelHandle tryStart, System::Reflection::Metadata::Ecma335::LabelHandle tryEnd, System::Reflection::Metadata::Ecma335::LabelHandle handlerStart, System::Reflection::Metadata::Ecma335::LabelHandle handlerEnd, System::Reflection::Metadata::EntityHandle catchType);
public void AddCatchRegion (System.Reflection.Metadata.Ecma335.LabelHandle tryStart, System.Reflection.Metadata.Ecma335.LabelHandle tryEnd, System.Reflection.Metadata.Ecma335.LabelHandle handlerStart, System.Reflection.Metadata.Ecma335.LabelHandle handlerEnd, System.Reflection.Metadata.EntityHandle catchType);
member this.AddCatchRegion : System.Reflection.Metadata.Ecma335.LabelHandle * System.Reflection.Metadata.Ecma335.LabelHandle * System.Reflection.Metadata.Ecma335.LabelHandle * System.Reflection.Metadata.Ecma335.LabelHandle * System.Reflection.Metadata.EntityHandle -> unit
Public Sub AddCatchRegion (tryStart As LabelHandle, tryEnd As LabelHandle, handlerStart As LabelHandle, handlerEnd As LabelHandle, catchType As EntityHandle)

Parâmetros

tryStart
LabelHandle

Rótulo marcando a primeira instrução do bloco try.

tryEnd
LabelHandle

Rótulo marcando a instrução imediatamente após o bloco try.

handlerStart
LabelHandle

Rótulo marcando a primeira instrução do manipulador.

handlerEnd
LabelHandle

Rótulo marcando a instrução imediatamente após o manipulador.

catchType
EntityHandle

O tipo de exceção a ser detectado: TypeDefinitionHandle, TypeReferenceHandle ou TypeSpecificationHandle.

Exceções

Um rótulo não foi definido por um codificador de instrução ao qual esse construtor está associado.

- ou -

catchType não é um identificador de tipo válido.

Um rótulo tem o valor padrão.

Aplica-se a