17 std::ostringstream oss;
29 using T = std::decay_t<
decltype(
value)>;
Protocol error message representation.
std::variant< Assignment, Inquiry, Command > InMessage
Variant type representing any incoming message.
constexpr const char * InMessageKindToString(InMessageKind kind)
Converts an InMessageKind enum to a human-readable string.
InMessageKind
Represents the type of an incoming message.
Utility functions for protocol string handling and validation in the irsol library.
Represents an error response message from the server.
Error(const std::string &identifier, InMessageKind source, const std::string &description)
InMessageKind source
The kind of input message that triggered the error.
std::string identifier
The identifier related to the failed operation (e.g., the variable or command name).
std::string description
A descriptive message explaining the cause of the error.
static Error from(const T &msg, const std::string &description)
Creates an error from a specific incoming message type.
std::string toString() const
Converts the error to a human-readable string.