MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / failure

Function failure

app/src/AI/FileSandbox.cpp:49–58  ·  view source on GitHub ↗

* @brief Builds a failure envelope with an error code and optional hint. */

Source from the content-addressed store, hash-verified

47 * @brief Builds a failure envelope with an error code and optional hint.
48 */
49static QJsonObject failure(const QString& error, const QString& hint = {})
50{
51 QJsonObject out;
52 out[QStringLiteral("ok")] = false;
53 out[QStringLiteral("error")] = error;
54 if (!hint.isEmpty())
55 out[QStringLiteral("hint")] = hint;
56
57 return out;
58}
59
60/**
61 * @brief Returns a workspace-relative display path, or the absolute path if outside.

Callers 15

InitLogFileMethod · 0.85
ReadDataMethod · 0.85
ReadNumberMethod · 0.85
GetFilePositionFunction · 0.85
GetLastFilePositionFunction · 0.85
SetFilePositionFunction · 0.85
SetFirstFilePositionFunction · 0.85
StepFilePositionFunction · 0.85
ReadByteFunction · 0.85
WriteByteFunction · 0.85
SetLastFilePositionMethod · 0.85
listMethod · 0.85

Calls 1

isEmptyMethod · 0.80

Tested by

no test coverage detected