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>
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.
◆ code()
virtual ErrorCode RdKafka::Error::code |
( |
| ) |
const |
|
pure virtual |
- Returns
- the error code, e.g., RdKafka::ERR_UNKNOWN_MEMBER_ID.
◆ name()
virtual std::string RdKafka::Error::name |
( |
| ) |
const |
|
pure virtual |
- Returns
- the error code name, e.g, "ERR_UNKNOWN_MEMBER_ID".
◆ str()
virtual std::string RdKafka::Error::str |
( |
| ) |
const |
|
pure virtual |
- Returns
- a human readable error string.
◆ is_fatal()
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.
◆ is_retriable()
virtual bool RdKafka::Error::is_retriable |
( |
| ) |
const |
|
pure virtual |
- Returns
- true if the operation may be retried, else false.
◆ txn_requires_abort()
virtual bool RdKafka::Error::txn_requires_abort |
( |
| ) |
const |
|
pure virtual |
The documentation for this class was generated from the following file: