Class Tryll::TryllError¶
ClassList > Tryll > TryllError
Exception thrown by TryllClient andAgentProxy on server errors or disconnects.More...
#include <TryllError.h>
Inherits the following classes: std::runtime_error
Public Functions¶
| Type | Name |
|---|---|
| std::uint32_t | GetCode () noexcept const Numeric error code from ErrorResponse , or 0 for connection-level errors. |
| const std::string & | GetMessage () noexcept const Human-readable error message. |
| TryllError (std::uint32_t code, std::string message) Construct a Tryll client error. |
Detailed Description¶
The numeric code surfaces the server's ErrorResponse.code ranges (1xxx connection, 2xxx session, 3xxx agent, 4xxx model, 5xxx node, 6xxx graph, 7xxx string storage, 8xxx embedded storage). Value 0 is reserved for client-originated failures such as socket errors or timeouts waiting for a response frame.
Public Functions Documentation¶
function GetCode¶
Numeric error code from ErrorResponse , or 0 for connection-level errors.
Match against the ranges in server/common/include/tryll/ErrorCodes.h to classify the failure family.
Returns:
Non-negative code; 0 indicates a client-side failure.
function GetMessage¶
Human-readable error message.
Identical to the string returned by what(), but without the overhead of a C-string view. Safe to reference for the lifetime of the exception object.
Returns:
Server or client-produced description of the failure.
function TryllError¶
Construct a Tryll client error.
Parameters:
codeNumeric error code fromErrorCodes.hranges, or 0 for client-originated failures.messageHuman-readable description (copied to both the base-classwhat()string andGetMessage()).
The documentation for this class was generated from the following file C:/_tryll/_monorepo/server/client-cpp/include/tryll/TryllError.h