diff options
author | Robert Gemmell <robbie@apache.org> | 2010-05-24 14:18:30 +0000 |
---|---|---|
committer | Robert Gemmell <robbie@apache.org> | 2010-05-24 14:18:30 +0000 |
commit | 74e5e89d2cf9a43505c1c85fc3f60f467d3f5ace (patch) | |
tree | 5898d66703ea8220bf5575053c82af9b22d1720f | |
parent | fce7db7c1a3e37a0abd1fa46b8a80b73a05e9ceb (diff) | |
download | qpid-python-74e5e89d2cf9a43505c1c85fc3f60f467d3f5ace.tar.gz |
QPID-2611: AMQConnectionFailureException records AMQPConstant message if cause is AMQPException
Applied patch from Andrew Kennedy <andrew.international@gmail.com>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@947650 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | java/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java b/java/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java index fa69f7f91b..f2503e549f 100644 --- a/java/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java +++ b/java/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java @@ -18,12 +18,9 @@ * under the License. * */ - package org.apache.qpid; -import java.util.ArrayList; import java.util.Collection; -import java.util.Iterator; import org.apache.qpid.protocol.AMQConstant; @@ -43,7 +40,7 @@ public class AMQConnectionFailureException extends AMQException public AMQConnectionFailureException(String message, Throwable cause) { - super(null, message, cause); + super(cause instanceof AMQException ? ((AMQException) cause).getErrorCode() : null, message, cause); } public AMQConnectionFailureException(AMQConstant errorCode, String message, Throwable cause) |