Repository: qpid-proton Updated Branches: refs/heads/master 35f425bc4 -> e9f9eef00
NO-JIRA: c++: add error reporting to mt_brokr.cpp Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/1c2dd81c Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/1c2dd81c Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/1c2dd81c Branch: refs/heads/master Commit: 1c2dd81cafd8291e0e1ed9a0a8ad78b285e1a43a Parents: 35f425b Author: Alan Conway <[email protected]> Authored: Fri Jul 15 17:08:42 2016 -0400 Committer: Alan Conway <[email protected]> Committed: Fri Jul 15 17:08:42 2016 -0400 ---------------------------------------------------------------------- examples/cpp/mt/broker.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1c2dd81c/examples/cpp/mt/broker.cpp ---------------------------------------------------------------------- diff --git a/examples/cpp/mt/broker.cpp b/examples/cpp/mt/broker.cpp index 29fe97f..f100972 100644 --- a/examples/cpp/mt/broker.cpp +++ b/examples/cpp/mt/broker.cpp @@ -23,8 +23,9 @@ #include <proton/connection.hpp> #include <proton/default_container.hpp> #include <proton/delivery.hpp> -#include <proton/messaging_handler.hpp> +#include <proton/error_condition.hpp> #include <proton/listen_handler.hpp> +#include <proton/messaging_handler.hpp> #include <proton/thread_safe.hpp> #include <atomic> @@ -194,6 +195,9 @@ class broker_connection_handler : public proton::messaging_handler { erase_sender_if(range.first, range.second, predicate); } + void on_error(const proton::error_condition& e) OVERRIDE { + std::cerr << "error: " << e.what() << std::endl; + } // The container calls on_transport_close() last. void on_transport_close(proton::transport&) OVERRIDE { delete this; // All done. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
