|
Modern C++ Kafka API
|
Unified error type. More...
#include <Error.h>
Public Member Functions | |
| Error (rd_kafka_error_t *error=nullptr) | |
| Error (rd_kafka_resp_err_t respErr) | |
| Error (rd_kafka_resp_err_t respErr, std::string message, bool fatal=false) | |
| Error (const Error &error) | |
| Error & | operator= (const Error &error) |
| operator bool () const | |
| Check if the error is valid. | |
| operator std::error_code () const | |
Conversion to std::error_code | |
| int | value () const |
| Obtains the underlying error code value. More... | |
| std::string | message () const |
| Readable error string. | |
| std::string | toString () const |
| Detailed error string. | |
| bool | isFatal () const |
| Fatal error indicates that the client instance is no longer usable. | |
| Optional< bool > | isRetriable () const |
| Show whether the operation may be retried. | |
| bool | transactionRequiresAbort () const |
| Show whether the error is an abortable transaction error. More... | |
Unified error type.
|
inline |
Show whether the error is an abortable transaction error.
Note:
true, the producer must call abortTransaction and start a new transaction with beginTransaction to proceed with transactions.
|
inline |
Obtains the underlying error code value.
Actually, it's the same as 'rd_kafka_resp_err_t', which is defined by librdkafka.