Skip to content

Commit

Permalink
Fix ServerError is not converted to string in log (apache#9277)
Browse files Browse the repository at this point in the history
  • Loading branch information
BewareMyPower authored Jan 23, 2021
1 parent d3f8440 commit daa79de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pulsar-client-cpp/lib/ClientConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ static Result getResult(ServerError serverError) {
return ResultUnknownError;
}

inline std::ostream& operator<<(std::ostream& os, ServerError error) {
os << getResult(error);
return os;
}

static bool file_exists(const std::string& path) {
if (path.empty()) {
return false;
Expand Down

0 comments on commit daa79de

Please sign in to comment.