C++ SDK Documentation
12.0.0
|
Holds the contents of a user-defined message to be reported by a UDx. More...
Public Member Functions | |
ClientMessage (int errorcode, std::string main, std::string hint="", std::string detail="") | |
ClientMessage () | |
bool | hasDetail () const |
bool | hasHint () const |
template<typename... Argtypes> | |
ClientMessage & | setDetail (const char *fmt, Argtypes &&...args) |
template<typename... Argtypes> | |
ClientMessage & | setHint (const char *fmt, Argtypes &&...args) |
void | truncateLengths (size_t maxLen) |
Static Public Member Functions | |
template<typename... Argtypes> | |
static ClientMessage | makeMessage (int errorcode, const char *fmt, Argtypes &&...args) |
Public Attributes | |
std::string | msg_detail |
int | msg_errorcode |
std::string | msg_hint |
std::string | msg_main |
Holds the contents of a user-defined message to be reported by a UDx.
Made using ClientMessage::makeMessage(...). Must have an error code and main message, but the hint and detail strings are optional. Reported to the client using one of the ServerInterface methods (reportInfo, reportNotice, reportWarning, or reportError).
|
inline |
Constructor
|
inline |
Nullary constructor
Referenced by makeMessage().
|
inline |
Does this message have a non-empty detail?
|
inline |
Does this message have a non-empty hint?
|
inlinestatic |
Builds a message using printf-style arguments to format the main text.
errorcode | This message's id number |
fmt | A printf-style format string for the main body |
args | Any arguments to be substituted into fmt |
|
inline |
Sets this message's detail field.
fmt | A printf-style format string for the detail |
args | Any argumetns to be substituted into fmt |
|
inline |
Sets this message's hint field.
fmt | A printf-style format string for the hint |
args | Any argumetns to be substituted into fmt |
|
inline |
Truncate the lengths of the string fields, keeping them at most maxLen
maxLen | The largest length allowed for this message's fields |
std::string Vertica::ClientMessage::msg_detail |
Message detail (optional)
Referenced by hasDetail(), setDetail(), and truncateLengths().
int Vertica::ClientMessage::msg_errorcode |
ID code for this message
std::string Vertica::ClientMessage::msg_hint |
Message hint (optional)
Referenced by hasHint(), setHint(), and truncateLengths().
std::string Vertica::ClientMessage::msg_main |
Main message body (required)
Referenced by truncateLengths().