Class Ek9FailureMarker
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 of(int) as a constant: 9 and 10 for the arguments, 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 firstLineCode(String) and
withoutMarker(String).
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic OptionalIntThe code a line names when it is EXACTLY a marker (surrounding whitespace aside), else empty.static OptionalIntfirstLineCode(String stderr) The code named by the FIRST line of a stderr capture when that line is a marker, else empty.static Stringof(int exitCode) The marker for an EK9-owned failure exit, e.g.static StringwithoutMarker(String stderr) The stderr capture with a leading marker line removed (unchanged when there is none).
-
Field Details
-
PREFIX
Every marker starts with this; it names the tool, asgit:orjavac:do.- See Also:
-
-
Method Details
-
of
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. -
codeIn
The code a line names when it is EXACTLY a marker (surrounding whitespace aside), else empty. -
firstLineCode
The code named by the FIRST line of a stderr capture when that line is a marker, else empty. Only the first line counts: a marker anywhere else was printed by something other than EK9. -
withoutMarker
-