mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-01 11:07:56 +00:00
Add Error class
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include "buffer.h"
|
||||
#include "topic.h"
|
||||
#include "macros.h"
|
||||
#include "error.h"
|
||||
|
||||
namespace cppkafka {
|
||||
|
||||
@@ -78,20 +79,10 @@ public:
|
||||
Message& operator=(const Message&) = delete;
|
||||
Message& operator=(Message&& rhs) = default;
|
||||
|
||||
/**
|
||||
* Indicates whether this is a message carrying an error notification
|
||||
*/
|
||||
bool has_error() const;
|
||||
|
||||
/**
|
||||
* Gets the error attribute
|
||||
*/
|
||||
rd_kafka_resp_err_t get_error() const;
|
||||
|
||||
/**
|
||||
* Gets the error as a string
|
||||
*/
|
||||
std::string get_error_string() const;
|
||||
Error get_error() const;
|
||||
|
||||
/**
|
||||
* Utility function to check for get_error() == RD_KAFKA_RESP_ERR__PARTITION_EOF
|
||||
|
||||
Reference in New Issue
Block a user