You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/02/01 22:12:46 UTC

[GitHub] merlimat closed pull request #1125: Added missing C++ enum values

merlimat closed pull request #1125: Added missing C++ enum values
URL: https://github.com/apache/incubator-pulsar/pull/1125
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/pulsar-client-cpp/include/pulsar/Result.h b/pulsar-client-cpp/include/pulsar/Result.h
index de72a71e7..8085d4837 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 7e954cd64..50584c598 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 59cf2a24c..cc210c897 100644
--- a/pulsar-client-cpp/lib/Commands.cc
+++ b/pulsar-client-cpp/lib/Commands.cc
@@ -367,6 +367,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 c988f0169..1deb5f2e5 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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services