mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-03 03:58:04 +00:00
Add Error class
This commit is contained in:
@@ -66,18 +66,10 @@ Message::Message(HandlePtr handle)
|
||||
|
||||
}
|
||||
|
||||
bool Message::has_error() const {
|
||||
return get_error() != RD_KAFKA_RESP_ERR_NO_ERROR;
|
||||
}
|
||||
|
||||
rd_kafka_resp_err_t Message::get_error() const {
|
||||
Error Message::get_error() const {
|
||||
return handle_->err;
|
||||
}
|
||||
|
||||
string Message::get_error_string() const {
|
||||
return rd_kafka_err2str(handle_->err);
|
||||
}
|
||||
|
||||
bool Message::is_eof() const {
|
||||
return get_error() == RD_KAFKA_RESP_ERR__PARTITION_EOF;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user