Class CilCatchHandler
A CIL exception handler that has typical 'catch' behavior: it is triggered when an exception is thrown and does not have special interactions with 'leave' instructions.
Inherited Members
Namespace: Flame.Clr.Analysis
Assembly: Flame.Clr.dll
Syntax
public sealed class CilCatchHandler : CilExceptionHandler
Constructors
| Improve this Doc View SourceCilCatchHandler(BasicBlockTag)
Creates an exception handler that will catch any exception.
Declaration
public CilCatchHandler(BasicBlockTag landingPad)
Parameters
Type | Name | Description |
---|---|---|
BasicBlockTag | landingPad | The landing pad to redirect flow to when an exception gets thrown. |
CilCatchHandler(BasicBlockTag, IReadOnlyList<IType>)
Creates an exception handler that will catch only exceptions that inherit from a list of types.
Declaration
public CilCatchHandler(BasicBlockTag landingPad, IReadOnlyList<IType> handledExceptionTypes)
Parameters
Type | Name | Description |
---|---|---|
BasicBlockTag | landingPad | The landing pad to redirect flow to when an exception gets thrown. |
System.Collections.Generic.IReadOnlyList<IType> | handledExceptionTypes | The list of exception types that are handled. Subtypes of these types are also handled. |
Properties
| Improve this Doc View SourceHandledExceptionTypes
Gets the list of types supported by this exception handler.
This property is null
if the handler catches all exceptions.
Declaration
public override IReadOnlyList<IType> HandledExceptionTypes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<IType> | A list of exception types or |
Overrides
| Improve this Doc View SourceLandingPad
Gets the landing pad basic block to which flow is redirected when an exception is thrown.
Declaration
public override BasicBlockTag LandingPad { get; }
Property Value
Type | Description |
---|---|
BasicBlockTag | A basic block tag. |
Overrides
Methods
| Improve this Doc View SourceGetCapturedException(FlowGraph)
Gets the exception captured by this catch handler.
Declaration
public ValueTag GetCapturedException(FlowGraph graph)
Parameters
Type | Name | Description |
---|---|---|
FlowGraph | graph | The control-flow graph that defines the landing pad. |
Returns
Type | Description |
---|---|
ValueTag | A value that identifies the exception captured by this catch handler. |