diff options
| author | Gordon Sim <gsim@apache.org> | 2013-11-08 14:08:07 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2013-11-08 14:08:07 +0000 |
| commit | 4c45498a8d160d451c496c97c5c280258802b072 (patch) | |
| tree | 6582c9a834740e4a8a2c6b1ec90da21a9c897193 /cpp/src | |
| parent | 5d9ff9cced55ecd4b486d15858ec85006ab6d338 (diff) | |
| download | qpid-python-4c45498a8d160d451c496c97c5c280258802b072.tar.gz | |
QPID-5300: correct error condition for certain unauthorized access errors
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1540040 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
| -rw-r--r-- | cpp/src/qpid/broker/amqp/Connection.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/qpid/broker/amqp/Connection.cpp b/cpp/src/qpid/broker/amqp/Connection.cpp index d4221246c5..a45313083b 100644 --- a/cpp/src/qpid/broker/amqp/Connection.cpp +++ b/cpp/src/qpid/broker/amqp/Connection.cpp @@ -246,6 +246,12 @@ void Connection::process() pn_condition_set_name(error, e.symbol()); pn_condition_set_description(error, e.what()); pn_link_close(l); + } catch (const qpid::framing::UnauthorizedAccessException& e) { + QPID_LOG_CAT(error, protocol, "Error on attach: " << e.what()); + pn_condition_t* error = pn_link_condition(l); + pn_condition_set_name(error, qpid::amqp::error_conditions::UNAUTHORIZED_ACCESS.c_str()); + pn_condition_set_description(error, e.what()); + pn_link_close(l); } catch (const std::exception& e) { QPID_LOG_CAT(error, protocol, "Error on attach: " << e.what()); pn_condition_t* error = pn_link_condition(l); |
