Freigeben über


CatchClauseAst Constructor

Definition

Construct a catch clause.

public:
 CatchClauseAst(System::Management::Automation::Language::IScriptExtent ^ extent, System::Collections::Generic::IEnumerable<System::Management::Automation::Language::TypeConstraintAst ^> ^ catchTypes, System::Management::Automation::Language::StatementBlockAst ^ body);
public CatchClauseAst (System.Management.Automation.Language.IScriptExtent extent, System.Collections.Generic.IEnumerable<System.Management.Automation.Language.TypeConstraintAst> catchTypes, System.Management.Automation.Language.StatementBlockAst body);
new System.Management.Automation.Language.CatchClauseAst : System.Management.Automation.Language.IScriptExtent * seq<System.Management.Automation.Language.TypeConstraintAst> * System.Management.Automation.Language.StatementBlockAst -> System.Management.Automation.Language.CatchClauseAst
Public Sub New (extent As IScriptExtent, catchTypes As IEnumerable(Of TypeConstraintAst), body As StatementBlockAst)

Parameters

extent
IScriptExtent

The extent of the catch, from the catch keyword to the closing curly brace.

catchTypes
IEnumerable<TypeConstraintAst>

The collection of types caught by this catch clause, may be null if all types are caught.

body
StatementBlockAst

The body of the catch clause.

Exceptions

If extent or body is null.

Applies to