PROTON-1095: Make the exception thrown on unhandled error be proton::error
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/fa11ada8 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/fa11ada8 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/fa11ada8 Branch: refs/heads/master Commit: fa11ada8a804c2353633965ff756b9c5991d1cc6 Parents: 8058756 Author: Andrew Stitcher <[email protected]> Authored: Tue Jan 26 12:56:01 2016 -0500 Committer: Andrew Stitcher <[email protected]> Committed: Tue Jan 26 12:56:01 2016 -0500 ---------------------------------------------------------------------- proton-c/bindings/cpp/src/handler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/fa11ada8/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 90198b0..5948b36 100644 --- a/proton-c/bindings/cpp/src/handler.cpp +++ b/proton-c/bindings/cpp/src/handler.cpp @@ -20,6 +20,7 @@ */ #include "proton/handler.hpp" +#include "proton/error.hpp" #include "proton/transport.hpp" #include "proton_event.hpp" @@ -61,6 +62,6 @@ void handler::on_transaction_commit(event &e) { on_unhandled(e); } void handler::on_transaction_declare(event &e) { on_unhandled(e); } void handler::on_unhandled(event &) {} -void handler::on_unhandled_error(event &, const condition& c) { throw std::runtime_error(c.str()); } +void handler::on_unhandled_error(event &, const condition& c) { throw proton::error(c.str()); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
