Feature summary
The new sendScriptBlocking method introduced in #425 currently returns a boolean success value.
Instead, it should inform callers on what went wrong.
In my personal opinion, the right interface for that would be std::expected, but since we don't do c++23 here, yet, throwing exceptions would be the most straightforward way.
Alternatively, a custom return type could be used, e.g.
struct ScriptExecutionResult
{
bool success;
// Those booleans could also be encoded into a REASON enum. They aren't necessarily all being checked.
bool robot_mode_allows_execution;
bool safety_mode_allows_execution;
bool start_timeout;
std::string message;
std::optional<RuntimeExceptionMessage> runtime_execption;
std::vector<ErrorCodeMessage> error_codes;
};
Feature summary
The new
sendScriptBlockingmethod introduced in #425 currently returns a boolean success value.Instead, it should inform callers on what went wrong.
In my personal opinion, the right interface for that would be
std::expected, but since we don't do c++23 here, yet, throwing exceptions would be the most straightforward way.Alternatively, a custom return type could be used, e.g.