merlimat commented on a change in pull request #11668:
URL: https://github.com/apache/pulsar/pull/11668#discussion_r689012284



##########
File path: pulsar-client-cpp/lib/Commands.cc
##########
@@ -644,6 +644,7 @@ std::string Commands::messageType(BaseCommand_Type type) {
             return "END_TXN_ON_SUBSCRIPTION_RESPONSE";
             break;
     };
+    BOOST_THROW_EXCEPTION(std::logic_error("Invalid BaseCommand enumeration 
value"));

Review comment:
       I think that here (and in similar cases below) the idea here was to make 
sure we get a warning/error if we leave out an enum, so that we don't forget to 
add it.

##########
File path: pulsar-client-cpp/CMakeLists.txt
##########
@@ -288,6 +288,10 @@ if (NOT APPLE AND NOT MSVC)
     set(CMAKE_CXX_FLAGS_PYTHON "${CMAKE_CXX_FLAGS}")
     # Hide all non-exported symbols to avoid conflicts
     set(CMAKE_CXX_FLAGS " -fvisibility=hidden -Wl,--exclude-libs,ALL 
${CMAKE_CXX_FLAGS}")
+    # Turn on color erro messages and show additional help with errors:
+    set(CMAKE_CXX_FLAGS " -fdiagnostics-show-option -fdiagnostics-color 
${CMAKE_CXX_FLAGS}")

Review comment:
       This might not work with older Gcc or Clang versions.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to