LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::cli::Response Struct Reference

What one invocation produced. More...

#include <line/cli/cli_run.h>

Collaboration diagram for line::cli::Response:

Public Attributes

int exit_code = 0
 The CLI's own exit status: 0 ok, 2 line::Error, 3 other.
std::vector< std::string > documents
 Each JSON document the run emitted, in emission order, AS EMITTED.
std::string text
 Everything written to fd 1, with the collected documents still in it.
std::string diagnostics
 Everything written to fd 2: warnings, and the failure message.
std::string error
 Empty on success; the what() of the exception otherwise.
std::string error_id
 line::io::error_id's stable identifier for error.

Detailed Description

What one invocation produced.

Definition at line 104 of file cli_run.h.

Member Data Documentation

◆ diagnostics

std::string line::cli::Response::diagnostics

Everything written to fd 2: warnings, and the failure message.

Definition at line 129 of file cli_run.h.

Referenced by line::cli::run().

◆ documents

std::vector<std::string> line::cli::Response::documents

Each JSON document the run emitted, in emission order, AS EMITTED.

STRINGS AND NOT PARSED VALUES, deliberately. The eleven emission sites use three different indents and the numbers are printed at full precision so a cross-codebase diff is not capped (line_cli.cpp, emit_avg_table_named). Parsing here and re-dumping in the host would reformat both, and the reformatting would be invisible until someone diffed a golden. A host that wants a value parses this string itself, once, at the boundary where it builds its own objects.

PARTIAL ON FAILURE BY DESIGN: -a avg,sens whose sens arm throws has already produced the avg envelope, and the binary printed it. Dropping it here would lose an answer the equivalent command line gives. Read exit_code for whether the run as a whole succeeded.

Definition at line 124 of file cli_run.h.

Referenced by line::cli::run().

◆ error

std::string line::cli::Response::error

Empty on success; the what() of the exception otherwise.

Definition at line 132 of file cli_run.h.

Referenced by line::cli::run().

◆ error_id

std::string line::cli::Response::error_id

line::io::error_id's stable identifier for error.

One of line:input, line:numeric, line:unsupported, line:error, or line:internal for a std::exception that is not a line::Error and which error_id therefore cannot classify.

Definition at line 140 of file cli_run.h.

Referenced by line::cli::run().

◆ exit_code

int line::cli::Response::exit_code = 0

The CLI's own exit status: 0 ok, 2 line::Error, 3 other.

Definition at line 106 of file cli_run.h.

Referenced by line::cli::run().

◆ text

std::string line::cli::Response::text

Everything written to fd 1, with the collected documents still in it.

Definition at line 127 of file cli_run.h.

Referenced by line::cli::run().


The documentation for this struct was generated from the following file: