You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/11/17 21:29:14 UTC

qpid-proton git commit: PROTON-1689: [cpp] exception in handler results in garbage exception from run() [Forced Update!]

Repository: qpid-proton
Updated Branches:
  refs/heads/master 2e078cdca -> 1ff005f66 (forced update)


PROTON-1689: [cpp] exception in handler results in garbage exception from run()

Was using a pointer to an out-of-scope exception message to construct a new exception.


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

Branch: refs/heads/master
Commit: 1ff005f661e070d72397cdc3a431854693626b97
Parents: 9de60a8
Author: Alan Conway <ac...@redhat.com>
Authored: Fri Nov 17 16:26:09 2017 -0500
Committer: Alan Conway <ac...@redhat.com>
Committed: Fri Nov 17 16:27:38 2017 -0500

----------------------------------------------------------------------
 proton-c/bindings/cpp/src/proactor_container_impl.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1ff005f6/proton-c/bindings/cpp/src/proactor_container_impl.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/proactor_container_impl.cpp b/proton-c/bindings/cpp/src/proactor_container_impl.cpp
index 427bb7c..4a4ddce 100644
--- a/proton-c/bindings/cpp/src/proactor_container_impl.cpp
+++ b/proton-c/bindings/cpp/src/proactor_container_impl.cpp
@@ -630,7 +630,7 @@ void container::impl::thread() {
     while (!finished) {
         pn_event_batch_t *events = pn_proactor_wait(proactor_);
         pn_event_t *e;
-        const char *what = 0;
+        error_condition error;
         try {
             while ((e = pn_event_batch_next(events))) {
                 finished = handle(e);
@@ -638,14 +638,13 @@ void container::impl::thread() {
             }
         } catch (const std::exception& e) {
             // If we caught an exception then shutdown the (other threads of the) container
-            what = e.what();
+            error = error_condition("exception", e.what());
         } catch (...) {
-            what = "container shut-down by unknown exception";
+            error = error_condition("exception", "container shut-down by unknown exception");
         }
         pn_proactor_done(proactor_, events);
-        if (what) {
+        if (!error.empty()) {
             finished = true;
-            error_condition error("exception", what);
             {
                 GUARD(lock_);
                 disconnect_error_ = error;


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