You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2016/03/03 20:48:04 UTC

qpid-proton git commit: PROTON-1153: Settle on what() as name for printable condition summary.

Repository: qpid-proton
Updated Branches:
  refs/heads/master 5d106e15c -> 500f3597c


PROTON-1153: Settle on what() as name for printable condition summary.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/500f3597
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/500f3597
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/500f3597

Branch: refs/heads/master
Commit: 500f3597cea11fea461aa24d1232ac9f096f74c3
Parents: 5d106e1
Author: Andrew Stitcher <as...@apache.org>
Authored: Thu Mar 3 14:41:45 2016 -0500
Committer: Andrew Stitcher <as...@apache.org>
Committed: Thu Mar 3 14:41:45 2016 -0500

----------------------------------------------------------------------
 examples/cpp/broker.hpp                            | 4 ++--
 proton-c/bindings/cpp/include/proton/condition.hpp | 5 +----
 proton-c/bindings/cpp/src/condition.cpp            | 2 +-
 proton-c/bindings/cpp/src/handler.cpp              | 2 +-
 4 files changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/500f3597/examples/cpp/broker.hpp
----------------------------------------------------------------------
diff --git a/examples/cpp/broker.hpp b/examples/cpp/broker.hpp
index 26e42e7..5c8701d 100644
--- a/examples/cpp/broker.hpp
+++ b/examples/cpp/broker.hpp
@@ -199,11 +199,11 @@ class broker_handler : public proton::handler {
     }
 
     void on_transport_error(proton::event &e) {
-        std::cout << "broker client disconnect: " << e.transport().condition().str() << std::endl;
+        std::cout << "broker client disconnect: " << e.transport().condition().what() << std::endl;
     }
 
     void on_unhandled_error(proton::event &e, const proton::condition &c) {
-        std::cerr << "broker error: " << e.name() << ":" << c.str() << std::endl;
+        std::cerr << "broker error: " << e.name() << ":" << c.what() << std::endl;
     }
 
     void remove_stale_consumers(proton::connection connection) {

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/500f3597/proton-c/bindings/cpp/include/proton/condition.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/include/proton/condition.hpp b/proton-c/bindings/cpp/include/proton/condition.hpp
index 8a2c601..9e157f3 100644
--- a/proton-c/bindings/cpp/include/proton/condition.hpp
+++ b/proton-c/bindings/cpp/include/proton/condition.hpp
@@ -58,11 +58,8 @@ class condition {
     /// Extra information for condition.
     PN_CPP_EXTERN value info() const;
 
-    /// @cond INTERNAL
     /// Simple printable string for condition.
-    /// XXX not sure about this as a convention 
-    PN_CPP_EXTERN std::string str() const;
-    /// @endcond
+    PN_CPP_EXTERN std::string what() const;
 
     /// @cond INTERNAL
   private:

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/500f3597/proton-c/bindings/cpp/src/condition.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/condition.cpp b/proton-c/bindings/cpp/src/condition.cpp
index 3c10c39..b604251 100644
--- a/proton-c/bindings/cpp/src/condition.cpp
+++ b/proton-c/bindings/cpp/src/condition.cpp
@@ -46,7 +46,7 @@ value condition::info() const {
     return t ? value(t) : value();
 }
 
-std::string condition::str() const {
+std::string condition::what() const {
     if (!*this) {
         return "No error condition";
     } else {

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/500f3597/proton-c/bindings/cpp/src/handler.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/handler.cpp b/proton-c/bindings/cpp/src/handler.cpp
index c30e658..43febf5 100644
--- a/proton-c/bindings/cpp/src/handler.cpp
+++ b/proton-c/bindings/cpp/src/handler.cpp
@@ -59,6 +59,6 @@ void handler::on_delivery_release(event &e) { on_unhandled(e); }
 void handler::on_delivery_settle(event &e) { on_unhandled(e); }
 
 void handler::on_unhandled(event &) {}
-void handler::on_unhandled_error(event &, const condition& c) { throw proton::error(c.str()); }
+void handler::on_unhandled_error(event &, const condition& c) { throw proton::error(c.what()); }
 
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org