ClikaRT::Error
class
Header: ClikaRT/common/result.h
Inherits: std::exception
Thrown by the throwing API overloads and by Result::value_or_throw().
Marked exported so its typeinfo carries default visibility and is kept in the .so's dynamic symbols (see the export map's "typeinfo for ClikaRT::*"). The public API throws this caller-side (the inline header wrapper value_or_throw()s the library's Result), so most catches never cross the .so; the export is needed for the one place that does: the nn override seam, where your Module::output_shapes/compute override throws an Error that the library's dispatch try/catch (inside the .so) catches, so the two modules' typeinfos must coalesce (a -fvisibility=hidden build would otherwise localize it and the catch would miss).
Member functions
Error(Status, string)
Error(Status status, std::string message)
A failure with the coarse status and a readable message.
Declared in ClikaRT/common/result.h, line 115
Error(Status, string, string)
Error(
Status status,
std::string message,
std::string code_name
)
A failure additionally carrying the fine-grained status name (machine-readable in every build; see code_name()).
Declared in ClikaRT/common/result.h, line 119
status()
Status status() const noexcept
the coarse status classification
Declared in ClikaRT/common/result.h, line 122
what()
const char* what() const noexcept override
The message (std::exception surface). A failure you can act on (a bad shape, an option out of range, a missing file, an unreachable server) reads as plain text in every build and names the value it refuses. A message of the form E<digits> is an internal fault code: it stands for a defect inside the runtime, its value is specific to the build that produced it (it changes between releases), and it is not an identifier to record, compare, or branch on. Report it verbatim together with the runtime version; branch on code_name().
Declared in ClikaRT/common/result.h, line 131
code_name()
const std::string& code_name() const noexcept
The stable NAME of the fine-grained status the failure originated with (e.g. "TIMED_OUT", "BACKEND_NOT_LOADED"); empty when the error did not originate inside the runtime. Machine-readable in EVERY build; it survives release obfuscation even when the message is an opaque code. status() remains the coarse switch.
Declared in ClikaRT/common/result.h, line 137