Skip to main content
Version: 2.5.0

Error Codes

All Client API methods return an int status code. Check the return value against chronolog::CL_SUCCESS (0) before proceeding — any negative value indicates an error. All codes are defined in the chronolog namespace.

#include <client_errcode.h>

Client Error Codes

CodeValueDescription
CL_SUCCESS0Operation completed successfully
CL_ERR_UNKNOWN-1Generic/unexpected error
CL_ERR_INVALID_ARG-2Invalid argument or parameter
CL_ERR_NOT_EXIST-3Chronicle or Story does not exist
CL_ERR_ACQUIRED-4Resource is acquired and cannot be destroyed
CL_ERR_NOT_ACQUIRED-5Resource is not acquired and cannot be released
CL_ERR_CHRONICLE_EXISTS-6Chronicle with that name already exists
CL_ERR_NO_KEEPERS-7No ChronoKeeper nodes available
CL_ERR_NO_CONNECTION-8No connection to ChronoVisor
CL_ERR_NOT_AUTHORIZED-9Operation not authorized
CL_ERR_NO_PLAYERS-10No ChronoPlayer nodes available
CL_ERR_NOT_READER_MODE-11Client is in WRITER_MODE; read operations unavailable
CL_ERR_QUERY_TIMED_OUT-12Replay query timed out

Error Handling

Use to_string_client(int) to get the error name as a string for logging:

int ret = client.Connect();
if (ret != chronolog::CL_SUCCESS) {
std::cerr << "Connect failed: " << chronolog::to_string_client(ret) << "\n";
return 1;
}