Class Error¶
- Defined in File request.h
Class Documentation¶
-
class
Error
¶ Error status reported by client API.
Public Functions
-
Error
(const RequestStatus &status)¶ Create an error from a RequestStatus.
- Parameters
status
: The RequestStatus object
-
Error
(RequestStatusCode code = RequestStatusCode::SUCCESS)¶ Create an error from a RequestStatusCode.
- Parameters
code
: The status code for the error
-
Error
(RequestStatusCode code, const std::string &msg)¶ Create an error from a RequestStatusCode and a detailed message.
- Parameters
code
: The status code for the errormsg
: The detailed message for the error
-
RequestStatusCode
Code
() const¶ Accessor for the RequestStatusCode of this error.
- Return
- The RequestStatusCode for the error.
-
const std::string &
Message
() const¶ Accessor for the message of this error.
- Return
- The detailed messsage for the error. Empty if no detailed message.
-
const std::string &
ServerId
() const¶ Accessor for the ID of the inference server associated with this error.
- Return
- The ID of the inference server associated with this error, or empty-string if no inference server is associated with the error.
-
uint64_t
RequestId
() const¶ Accessor for the ID of the request associated with this error.
- Return
- The ID of the request associated with this error, or 0 (zero) if no request ID is associated with the error.
-
bool
IsOk
() const¶ Does this error indicate OK status?
- Return
- True if this error indicates “ok”/”success”, false if error indicates a failure.
Public Static Attributes
-
const Error
Success
¶ Convenience “success” value.
Can be used as Error::Success to indicate no error.
-