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/01/26 21:28:50 UTC
[1/4] qpid-proton git commit: Revert "PROTON-1095: [C++ binding]
temporarily disable rasing exception on error"
Repository: qpid-proton
Updated Branches:
refs/heads/master 5ec901323 -> f066bd520
Revert "PROTON-1095: [C++ binding] temporarily disable rasing exception on error"
This reverts commit 1bcfe660e44af1bfc9f6704fc20916a578d5cd25.
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/80587567
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/80587567
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/80587567
Branch: refs/heads/master
Commit: 80587567cc1c48e25fd69a11116175667471e7c8
Parents: 5ec9013
Author: Andrew Stitcher <as...@apache.org>
Authored: Tue Jan 26 11:48:23 2016 -0500
Committer: Andrew Stitcher <as...@apache.org>
Committed: Tue Jan 26 11:48:23 2016 -0500
----------------------------------------------------------------------
proton-c/bindings/cpp/src/handler.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/80587567/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 34c19e6..90198b0 100644
--- a/proton-c/bindings/cpp/src/handler.cpp
+++ b/proton-c/bindings/cpp/src/handler.cpp
@@ -61,8 +61,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 &) {}
-// XXXXX: FIXME - temporarily disabled exception to keep tests passing
-//void handler::on_unhandled_error(event &, const condition& c) { throw std::runtime_error(c.str()); }
-void handler::on_unhandled_error(event &, const condition& c) {}
+void handler::on_unhandled_error(event &, const condition& c) { throw std::runtime_error(c.str()); }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[3/4] qpid-proton git commit: PROTON-1095: Fixup example broker not
to exit at the smallest insult!
Posted by as...@apache.org.
PROTON-1095: Fixup example broker not to exit at the smallest insult!
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/9d3e9953
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/9d3e9953
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/9d3e9953
Branch: refs/heads/master
Commit: 9d3e995393a918b80aca5ef60061b27a387d053d
Parents: fa11ada
Author: Andrew Stitcher <as...@apache.org>
Authored: Tue Jan 26 15:09:01 2016 -0500
Committer: Andrew Stitcher <as...@apache.org>
Committed: Tue Jan 26 15:09:01 2016 -0500
----------------------------------------------------------------------
examples/cpp/broker.hpp | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9d3e9953/examples/cpp/broker.hpp
----------------------------------------------------------------------
diff --git a/examples/cpp/broker.hpp b/examples/cpp/broker.hpp
index c7fd0df..26e42e7 100644
--- a/examples/cpp/broker.hpp
+++ b/examples/cpp/broker.hpp
@@ -31,6 +31,7 @@
#include "proton/message.hpp"
#include "proton/handler.hpp"
#include "proton/sender.hpp"
+#include "proton/transport.hpp"
#include "proton/url.hpp"
#include <iostream>
@@ -117,7 +118,7 @@ class queues {
if (address.empty()) {
throw std::runtime_error("empty queue name");
}
-
+
queue*& q = queues_[address];
if (!q) q = new queue(address);
@@ -175,7 +176,7 @@ class broker_handler : public proton::handler {
void unsubscribe(proton::sender lnk) {
std::string address = lnk.local_source().address();
-
+
if (queues_.get(address).unsubscribe(lnk)) {
queues_.erase(address);
}
@@ -197,9 +198,17 @@ class broker_handler : public proton::handler {
remove_stale_consumers(e.connection());
}
+ void on_transport_error(proton::event &e) {
+ std::cout << "broker client disconnect: " << e.transport().condition().str() << std::endl;
+ }
+
+ void on_unhandled_error(proton::event &e, const proton::condition &c) {
+ std::cerr << "broker error: " << e.name() << ":" << c.str() << std::endl;
+ }
+
void remove_stale_consumers(proton::connection connection) {
proton::link_range r = connection.find_links(proton::endpoint::REMOTE_ACTIVE);
-
+
for (proton::link_iterator l = r.begin(); l != r.end(); ++l) {
if (!!l->sender()) {
unsubscribe(l->sender());
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[2/4] qpid-proton git commit: PROTON-1095: Make the exception thrown
on unhandled error be proton::error
Posted by as...@apache.org.
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 <as...@apache.org>
Authored: Tue Jan 26 12:56:01 2016 -0500
Committer: Andrew Stitcher <as...@apache.org>
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: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[4/4] qpid-proton git commit: PROTON-1095: Exported missed new symbol
definitions
Posted by as...@apache.org.
PROTON-1095: Exported missed new symbol definitions
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/f066bd52
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/f066bd52
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/f066bd52
Branch: refs/heads/master
Commit: f066bd520cb2b43524c0e836ee8e8b93e5384c7f
Parents: 9d3e995
Author: Andrew Stitcher <as...@apache.org>
Authored: Tue Jan 26 15:21:04 2016 -0500
Committer: Andrew Stitcher <as...@apache.org>
Committed: Tue Jan 26 15:21:04 2016 -0500
----------------------------------------------------------------------
proton-c/bindings/cpp/include/proton/condition.hpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f066bd52/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 426e374..de83c14 100644
--- a/proton-c/bindings/cpp/include/proton/condition.hpp
+++ b/proton-c/bindings/cpp/include/proton/condition.hpp
@@ -41,20 +41,20 @@ class condition {
/// @cond INTERNAL
/// XXX want to discuss
/// Assert no condition set.
- bool operator!() const;
+ PN_CPP_EXPORT bool operator!() const;
/// @endcond
/// Condition name.
- std::string name() const;
+ PN_CPP_EXPORT std::string name() const;
/// Descriptive string for condition.
- std::string description() const;
+ PN_CPP_EXPORT std::string description() const;
/// Extra information for condition n*/
- value info() const;
+ PN_CPP_EXPORT value info() const;
/// Simple printable string for condition.
- std::string str() const;
+ PN_CPP_EXPORT std::string str() const;
private:
pn_condition_t* condition_;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org