Chrono Mock
LanguageEnglish
Documentation Exit codes

The window

Scenarios and calendars

Exit codes

What the code at the end of each chrono command means, for a script that has to decide what happens next.

chrono run

The code is the session's verdict, not the code the application ended with. An application that ran happily on the real date has not tested the date at all, and a script that read only the application's own code would never notice. That code is still there: in the report, on the line exited, and in --json.

CodeMeaning
0Works: every process that read the time saw the session's date.
10Works partially: some ways of reading the time were covered, some were not.
11Does not work: the date did not reach the main ways the application reads the time.
4Undetermined: the session could not establish what it covered. An honest "cannot tell", never a pretended pass.
12The application closed right after it started and left nothing running on the session's clock. Usually it handed over to a copy of itself that was already running, or to a program of the other bitness the session could not enter. Only a program with a window raises this: a console program that ends that fast has done its work, and gets a verdict.
1Usage error: a bad option, a bad date or step, or a preset this command does not accept.
2The application could not be started, or the session could not enter it.
3Internal error: the session could not start, met something it did not expect, or stopped before it finished. No verdict.
5Not in this release: you asked for something that does not exist yet, such as a preset whose moment needs a calendar, which run cannot load yet. Separate from a usage error, so a script can tell "not yet" from "wrong".
6Cut short: --timeout ran out, or the session stopped responding for 15 seconds. No verdict, because it proves nothing about the application either way.
7Another session is already running. One session at a time: try again once it has ended.
8The session has a verdict, but the file --report names could not be written: the disk was full, or another program held the old file open, which then stays as it was. The verdict is still in the report on the screen.
  • 0, 10, 11 and 4 are the verdict: whether the date reached the application.
  • 8 also comes after a verdict, which is then on the screen but not in the file.
  • 12 means the application left before it could be judged.
  • The rest mean the run did not get that far, so they say nothing about the application.

In a pipeline, a step that only passes on a full verdict looks like this. The CLI and CI page has the reasoning and the caveats about runners.

chrono run .\build\app.exe --at 2038-01-19T03:14:00 --ticks 20 --timeout 120 --report evidence.txt
if ($LASTEXITCODE -ne 0) { throw "chrono run ended with $LASTEXITCODE" }

chrono calc

The calculator has no verdict to give, so its table is short.

CodeMeaning
0Worked out.
1Usage error: a bad option, an impossible date, a result out of range, or a calendar file with no business day in it.
5The step or unit is not in this release, or the step needs a calendar you did not give. Separate from a usage error, so a script can tell "not yet" from "wrong".

chrono presets and chrono calendars

CodeMeaning
0The folder was read. A file it refused is part of the answer, not an error.
1A bad option, or a folder that is missing or cannot be read.