Class Ek9FailureMarker
- All Implemented Interfaces:
IntFunction<String>
ek9.Main entry point rejecting a program's arguments - e.g.
ek9: compilation failed (exit 8). Use it; never format or parse the line elsewhere.
Why (Steve, 2026-10-05, decision C): a program's exit code shares the number space of
Ek9ExitCodes. A program may return 3, 8 or 11 - scripts being replaced by EK9 programs
need exactly the codes they had, and in production the compiled program runs without the
ek9 wrapper - so no code can be reserved, and the number alone can never say whose it
is. The marker can: a run whose first stderr line is a marker naming the same code as the exit
failed in EK9; a program's own exit (normal, a returned Integer, an uncaught Exception's
exitCode, a Panic) never carries one.
Writers: org.ek9lang.commands.CliStderr (the CLI process - it holds stderr so the
marker can precede everything else) and MainClassGenerator (the program's entry point,
which embeds apply(int) as a constant: 9 and 10 for the arguments, 18 for a URL policy that cannot be
loaded,
and the CLI's own codes
when it refuses its command line - 2 for '-r' with no name, 4 for a program it does not have, 6
for none named among several, 5 for none at all). Readers: the MCP runner
(Ek9SubprocessTool, RunProgramTool) through FirstLineFailureCode and
WithoutFailureMarker; Ek9FailureMarkerCode reads one line.
"First" means after the JVM's own launcher lines (IsJvmLauncherLine, Picked up
JAVA_TOOL_OPTIONS: ...), which no EK9 code can write ahead of; WithoutFailureMarker drops them too.
No statics (Steve, 2026-10-28): this is THE writer - hold an instance and apply the exit code.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
PREFIX
Every marker starts with this; it names the tool, asgit:orjavac:do.- See Also:
-
-
Constructor Details
-
Ek9FailureMarker
public Ek9FailureMarker()
-
-
Method Details
-
apply
The marker for an EK9-owned failure exit, e.g.ek9: compilation failed (exit 8);nullfor 0 and 1 (not failures) and for any code EK9 does not own.- Specified by:
applyin interfaceIntFunction<String>
-