Add Error class

This commit is contained in:
Matias Fontanini
2016-06-27 21:43:20 -07:00
parent 6cfe01afb1
commit cf6ac1675b
14 changed files with 188 additions and 45 deletions

View File

@@ -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