Execution hook called when an exception is thrown from the managed block.
Execution hook called when an exception is thrown from the managed block. This is executed prior to [onFinally].
Implementors are free to permit exceptions thrown from this method, however note that any new exceptions thrown will be added as a suppressed exception of the currently throwing exception. Thus it is strongly advised that implementors do not throw any exceptions if it would cause problems for an exception to be suppressed.
the resource being managed
Execution hook called after the managed block.
Execution hook called after the managed block.
This execution hook is called regardless if an exception is thrown.
Usually resources are released or closed in the lifecycle.
Implementors are free to permit exceptions thrown from this method, however
it is strongly advised to not have the
method throw java.lang.InterruptedException
. This exception interacts with a thread's
interrupted status, and runtime misbehavior is likely to occur if an java.lang.InterruptedException
is suppressed. More generally, if it would cause problems for an exception to be suppressed,
the AutoCloseable.close method should not throw it."
the resource being managed
(canManage: StringAdd).self
(canManage: StringFormat).self
(canManage: ArrowAssoc[CanManage[R]]).x
(Since version 2.10.0) Use leftOfArrow
instead
(canManage: Ensuring[CanManage[R]]).x
(Since version 2.10.0) Use resultOfEnsuring
instead
For encapsulating the management logic of a resource.
Default logic for any
java.lang.AutoClosable
is provided by the companion object, which may be imported into current scope as implicits.Other types may be provided in scope by the user. For example
the type of the resource to manage