Class ExceptionNotCloseableOrError

All Implemented Interfaces:
Consumer<org.antlr.v4.runtime.tree.ParseTree>

final class ExceptionNotCloseableOrError extends TypedSymbolAccess implements Consumer<org.antlr.v4.runtime.tree.ParseTree>
THE rule that an Exception, or any sub-type of one, has no operator close (E81074, Steve 2026-10-26, decision (b) of the closeables lane): an exception is a VALUE carried to a handler, not a resource. A thrown exception has no try that owns it and a catch is not an owner, so a close declared on one ran never - it was thrown, caught, and left open.

It is asked of every class and says an Exception sub-type is closeable when HasCloseOperator says its type is: a close it writes, one it defaults (default operator close, for a closeable property it holds) and one it inherits - from a trait it takes (with trait of Closer, whose abstract close it must implement) or from a super that is itself an Exception. Reported ONCE down a hierarchy, on the first type that is closeable, so the sub-types of a faulty exception do not repeat the fault.

  • Constructor Details

  • Method Details

    • accept

      public void accept(org.antlr.v4.runtime.tree.ParseTree node)
      Specified by:
      accept in interface Consumer<org.antlr.v4.runtime.tree.ParseTree>