The Error class is used as a return value from APIs to propagate an error. The error consists of an error code which is to be used programatically, an error string for showing to the user, and various error flags that can be used programmatically to decide how to handle the error; e.g., should the operation be retried, was it a fatal error, etc.
More...
#include <rdkafkacpp.h>
|
static Error * | create (ErrorCode code, const std::string *errstr) |
| Create error object.
|
|
The Error class is used as a return value from APIs to propagate an error. The error consists of an error code which is to be used programatically, an error string for showing to the user, and various error flags that can be used programmatically to decide how to handle the error; e.g., should the operation be retried, was it a fatal error, etc.
Error objects must be deleted explicitly to free its resources.
virtual ErrorCode RdKafka::Error::code |
( |
| ) |
const |
|
pure virtual |
- Returns
- the error code, e.g., RdKafka::ERR_UNKNOWN_MEMBER_ID.
virtual std::string RdKafka::Error::name |
( |
| ) |
const |
|
pure virtual |
- Returns
- the error code name, e.g, "ERR_UNKNOWN_MEMBER_ID".
virtual std::string RdKafka::Error::str |
( |
| ) |
const |
|
pure virtual |
- Returns
- a human readable error string.
virtual bool RdKafka::Error::is_fatal |
( |
| ) |
const |
|
pure virtual |
- Returns
- true if the error is a fatal error, indicating that the client instance is no longer usable, else false.
virtual bool RdKafka::Error::is_retriable |
( |
| ) |
const |
|
pure virtual |
- Returns
- true if the operation may be retried, else false.
virtual bool RdKafka::Error::txn_requires_abort |
( |
| ) |
const |
|
pure virtual |
The documentation for this class was generated from the following file: