Class HaltAndCatchFire<T>
java.lang.Object
ca.mcscert.jpipe.compiler.model.Transformation<T,T>
ca.mcscert.jpipe.compiler.model.Checker<T>
ca.mcscert.jpipe.compiler.steps.checkers.HaltAndCatchFire<T>
- Type Parameters:
T- type of model used at that point (only useful for chaining purpose).
Converts accumulated non-fatal errors into a fatal signal, aborting the
pipeline at the next step boundary.
This checker is part of the "late error management" design: lexing and
parsing report errors as non-fatal diagnostics so that both steps always run.
Placing this checker after them causes the pipeline to abort — via the
ctx.hasFatalErrors() fast-fail in
Transformation.fire(I, CompilationContext) — before
downstream steps attempt to build or render a model from a broken parse tree.
The name is a reference to the HCF instruction in IBM System/360 (as well as a good TV show).
-
Nested Class Summary
Nested classes/interfaces inherited from class Checker
Checker.Check<I>Nested classes/interfaces inherited from class Transformation
Transformation.Step<I,O> -
Field Summary
Fields inherited from class Transformation
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheck(T input, CompilationContext ctx) Perform the check.
-
Constructor Details
-
HaltAndCatchFire
public HaltAndCatchFire()
-
-
Method Details
-
check
Description copied from class:CheckerPerform the check. Must not modifyinput. Non-fatal issues should be reported viactx.error()rather than thrown; throw (or callctx.fatal()) only for unrecoverable failures.
-