zio.blocks.scope.Finalization
See theFinalization companion object
The result of running finalizers, collecting any errors that occurred.
When a scope closes, each registered finalizer runs in LIFO order. Finalizers that throw are caught and their exceptions are collected into a Finalization. This type provides convenient methods for inspecting and re-throwing those errors.
Value parameters
errors
the errors collected from running finalizers
Attributes
Companion
object
Source
Finalization.scala
Graph
Reset zoom Hide graph Show graph
Supertypes
trait Matchable
class Any
Members list
Returns true if no finalizer errors were collected.
Returns true if at least one finalizer error was collected.
Returns true if at least one finalizer error was collected.
Attributes
Source
Finalization.scala
Throws the first collected error with all remaining errors added as suppressed. Does nothing if there are no errors.
Throws the first collected error with all remaining errors added as suppressed. Does nothing if there are no errors.
The first error corresponds to the head of the chunk (the first finalizer that failed in LIFO execution order).
Attributes
Source
Finalization.scala
Adds all collected errors as suppressed exceptions to initial and returns it. If there are no errors, initial is returned unchanged.
Adds all collected errors as suppressed exceptions to initial and returns it. If there are no errors, initial is returned unchanged.
Value parameters
initial
the primary throwable to attach suppressed exceptions to
Attributes
Returns
initial, with any finalizer errors added as suppressed
Source
Finalization.scala