Class ExceptionHandlerStack
- Namespace
- Echo.Platforms.AsmResolver.Emulation.Stack
- Assembly
- Echo.Platforms.AsmResolver.dll
Implements the exception handling mechanism within a single managed method.
public class ExceptionHandlerStack : IndexableStack<ExceptionHandlerFrame>, IReadOnlyList<ExceptionHandlerFrame>, IReadOnlyCollection<ExceptionHandlerFrame>, IEnumerable<ExceptionHandlerFrame>, IEnumerable
- Inheritance
-
ExceptionHandlerStack
- Implements
- Inherited Members
Methods
EndFilter(bool)
Exits a filter clause with the provided result, and unwinds the exception handler stack if necessary.
public ExceptionHandlerResult EndFilter(bool result)
Parameters
resultboolThe result of the filter expression.
Returns
- ExceptionHandlerResult
The offset to jump to next within the method, or the exception object if the exception was not handled by the method.
EndFinally()
Exits a finally clause, and unwinds the exception handler stack if necessary.
public ExceptionHandlerResult EndFinally()
Returns
- ExceptionHandlerResult
The offset to jump to next within the method, or the exception object if the exception was not handled by the method.
Leave(int)
Safely leaves one or more exception handlers that are currently on the stack.
public int Leave(int targetOffset)
Parameters
targetOffsetintThe offset as indicated by the leave instruction.
Returns
- int
The offset to jump to next.
RegisterException(ObjectHandle)
Registers an exception, unwinds the exception handler stack and determines where to jump to within the current method.
public ExceptionHandlerResult RegisterException(ObjectHandle exceptionObject)
Parameters
exceptionObjectObjectHandleThe handle to the exception that was thrown.
Returns
- ExceptionHandlerResult
The offset to jump to next within the method, or the exception object if the exception was not handled by the method.