This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new b8fa8c1  Added missing C++ enum values (#1125)
b8fa8c1 is described below

commit b8fa8c1696172d619eb51f38bf66fa51c2cc4c6e
Author: Matteo Merli <mme...@apache.org>
AuthorDate: Thu Feb 1 14:12:42 2018 -0800

    Added missing C++ enum values (#1125)
    
    * Added missing C++ enum values
    
    * Fixed formatting
---
 pulsar-client-cpp/include/pulsar/Result.h | 4 +++-
 pulsar-client-cpp/lib/ClientConnection.cc | 6 ++++++
 pulsar-client-cpp/lib/Commands.cc         | 6 ++++++
 pulsar-client-cpp/lib/Result.cc           | 3 +++
 4 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/pulsar-client-cpp/include/pulsar/Result.h 
b/pulsar-client-cpp/include/pulsar/Result.h
index de72a71..8085d48 100644
--- a/pulsar-client-cpp/include/pulsar/Result.h
+++ b/pulsar-client-cpp/include/pulsar/Result.h
@@ -71,7 +71,9 @@ enum Result
     ResultTopicNotFound,                          /// Topic not found
     ResultSubscriptionNotFound,                   /// Subscription not found
     ResultConsumerNotFound,                       /// Consumer not found
-    ResultUnsupportedVersionError  /// Error when an older client/version 
doesn't support a required feature
+    ResultUnsupportedVersionError,  /// Error when an older client/version 
doesn't support a required feature
+
+    ResultTopicTerminated  /// Topic was already terminated
 };
 
 // Return string representation of result code
diff --git a/pulsar-client-cpp/lib/ClientConnection.cc 
b/pulsar-client-cpp/lib/ClientConnection.cc
index 8bdd7a2..08d5572 100644
--- a/pulsar-client-cpp/lib/ClientConnection.cc
+++ b/pulsar-client-cpp/lib/ClientConnection.cc
@@ -97,6 +97,12 @@ static Result getResult(ServerError serverError) {
 
         case UnsupportedVersionError:
             return ResultUnsupportedVersionError;
+
+        case TooManyRequests:
+            return ResultTooManyLookupRequestException;
+
+        case TopicTerminatedError:
+            return ResultTopicTerminated;
     }
     // NOTE : Do not add default case in the switch above. In future if we get 
new cases for
     // ServerError and miss them in the switch above we would like to get 
notified. Adding
diff --git a/pulsar-client-cpp/lib/Commands.cc 
b/pulsar-client-cpp/lib/Commands.cc
index 0c3fdbd..70d61df 100644
--- a/pulsar-client-cpp/lib/Commands.cc
+++ b/pulsar-client-cpp/lib/Commands.cc
@@ -375,6 +375,12 @@ std::string Commands::messageType(BaseCommand_Type type) {
         case BaseCommand::CONSUMER_STATS_RESPONSE:
             return "CONSUMER_STATS_RESPONSE";
             break;
+        case BaseCommand::REACHED_END_OF_TOPIC:
+            return "REACHED_END_OF_TOPIC";
+            break;
+        case BaseCommand::SEEK:
+            return "SEEK";
+            break;
     };
 }
 
diff --git a/pulsar-client-cpp/lib/Result.cc b/pulsar-client-cpp/lib/Result.cc
index c988f01..1deb5f2 100644
--- a/pulsar-client-cpp/lib/Result.cc
+++ b/pulsar-client-cpp/lib/Result.cc
@@ -119,6 +119,9 @@ const char* pulsar::strResult(Result result) {
 
         case ResultUnsupportedVersionError:
             return "UnsupportedVersionError";
+
+        case ResultTopicTerminated:
+            return "TopicTerminated";
     };
     // NOTE : Do not add default case in the switch above. In future if we get 
new cases for
     // ServerError and miss them in the switch above we would like to get 
notified. Adding

-- 
To stop receiving notification emails like this one, please contact
mme...@apache.org.

Reply via email to