An abstract context element that handles exception stack trace management for coroutines. BaseContinuation.startException and BaseContinuation.buildCallStack delegate to this element.

The default implementation is DefaultExceptionHandler.

Static variables

@:value(new Key<ExceptionHandler>("ExceptionHandler"))staticfinalread onlykey:Key<ExceptionHandler> = new Key<ExceptionHandler>("ExceptionHandler")

Methods

buildCallStack(context:Context, frame:IStackFrame):Void

Called as an exception propagates up the coroutine continuation chain, to insert each continuation frame's stack item into the exception stack.

startException(context:Context, frame:IStackFrame, exception:Exception):Exception

Called when an exception is first encountered in a coroutine to process its stack trace. Returns the (potentially modified) exception.