Uses of Record Class
org.ek9lang.compiler.phase7.generator.ResourceCloser.FirstFailure
Packages that use ResourceCloser.FirstFailure
-
Uses of ResourceCloser.FirstFailure in org.ek9lang.compiler.phase7.generator
Methods in org.ek9lang.compiler.phase7.generator that return ResourceCloser.FirstFailureModifier and TypeMethodDescriptionApplicationClose.newFirstFailure()The first-failure slot the closes record into, declared before the first close.ResourceCloser.newFirstFailure()A new first-failure variable for one region.ResourceCloser.newFirstFailure(String ownerScopeId) ResourceCloser.newFirstFailure()for a region made in a scope that is not yet current where the variable is declared (try-with-resources: the resource scope, entered after the declarations).Methods in org.ek9lang.compiler.phase7.generator with parameters of type ResourceCloser.FirstFailureModifier and TypeMethodDescriptionResourceCloser.closeEach(List<ResourceCloser.Closing> closings, ResourceCloser.FirstFailure firstFailure, DebugInfo debugInfo) ResourceCloser.closingRegion(List, List, ResourceCloser.FirstFailure, DebugInfo)with no body: every value that is present closed, last first, each in its own protected region, then the first close failure rethrown with the later ones suppressed onto it.voidApplicationClose.closeOwned(IRInstructionBuilder builder, String taken, RegistrationData registration, ResourceCloser.FirstFailure firstFailure, DebugInfo debugInfo) The close of one registered component that has been taken out of the registry intotaken, inside the registration's OWN scope (the caller'sIRInstructionBuilder.inNewScope(DebugInfo, Consumer)): that scope owns the component across the close and drops it at its exit, so it is released whether the close returns, records a failure or the region is left by a Panic (V-A: never live and unowned across a call).ResourceCloser.closeRecording(ResourceCloser.Closing closing, ResourceCloser.FirstFailure firstFailure) ONE value, closed if present, in its own protected region that records an EK9 Exception intofirstFailure(the first) or suppresses it onto that (any later) - for a caller that holds the values itself and must do more between two closes (the application takes each registered component out of the registry, closes it and drops it:ApplicationClose).ResourceCloser.closingRegion(List<IRInstr> body, List<ResourceCloser.Closing> closings, ResourceCloser.FirstFailure firstFailure, DebugInfo debugInfo) THE owned region:body, then - on the normal path, after an EK9 Exception, and while a Panic unwinds - every value inclosingsthat is present is closed, last first, each in its own protected region; then the first EK9 Exception (the body's, else the first close's) is rethrown with the later close failures suppressed onto it.ApplicationClose.declare(ResourceCloser.FirstFailure firstFailure, DebugInfo debugInfo) ResourceCloser.declareFirstFailure(ResourceCloser.FirstFailure firstFailure, DebugInfo debugInfo) SLOT_DECLARE firstFailure, org.ek9.lang::Exception, owner- null until a failure is recorded.ResourceCloser.failureRegion(List<IRInstr> body, List<ResourceCloser.Closing> closings, ResourceCloser.FirstFailure firstFailure, DebugInfo debugInfo) The closes ofResourceCloser.closingRegion(List, List, ResourceCloser.FirstFailure, DebugInfo), run only whenbodyfails with an EK9 Exception - which is then rethrown with any close failure suppressed onto it.ApplicationClose.rethrow(ResourceCloser.FirstFailure firstFailure, DebugInfo debugInfo) After every registration has been closed and dropped: rethrow the first close failure, if any.ResourceCloser.rethrow(ResourceCloser.FirstFailure firstFailure, DebugInfo debugInfo) After a caller's own sequence ofResourceCloser.closeRecording(ResourceCloser.Closing, ResourceCloser.FirstFailure):THROW firstFailurewhen one was recorded.