summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2006-11-07 12:23:43 +0000
committerMartin Ritchie <ritchiem@apache.org>2006-11-07 12:23:43 +0000
commitffa8c607996d8019682e5b63f23653483044e46d (patch)
treec3655ab768a93c0d13e09b21ce7999bac7aeb08e
parent542628938efff905156be512dae68cecc1eb6c48 (diff)
downloadqpid-python-ffa8c607996d8019682e5b63f23653483044e46d.tar.gz
Added extra logging around InVM failures
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/java@472081 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--client/src/org/apache/qpid/client/transport/TransportConnection.java26
1 files changed, 24 insertions, 2 deletions
diff --git a/client/src/org/apache/qpid/client/transport/TransportConnection.java b/client/src/org/apache/qpid/client/transport/TransportConnection.java
index c935ff0ad0..a7ca3ffc3c 100644
--- a/client/src/org/apache/qpid/client/transport/TransportConnection.java
+++ b/client/src/org/apache/qpid/client/transport/TransportConnection.java
@@ -219,7 +219,18 @@ public class TransportConnection
{
_logger.info("Unable to create InVM Qpid.AMQP on port " + port + ". Because: " + e.getCause());
_logger.error(e);
- throw new AMQVMBrokerCreationException(port, e.getCause() + " Stopped InVM Qpid.AMQP creation");
+ String because;
+ if (e.getCause() == null)
+ {
+ because = e.toString();
+ }
+ else
+ {
+ because = e.getCause().toString();
+ }
+
+
+ throw new AMQVMBrokerCreationException(port, because + " Stopped InVM Qpid.AMQP creation");
}
_acceptor.bind(pipe, provider);
@@ -230,7 +241,18 @@ public class TransportConnection
catch (IOException e)
{
_logger.error(e);
- throw new AMQVMBrokerCreationException(port, e.getCause() + " Stopped binding of InVM Qpid.AMQP");
+
+ String because;
+ if (e.getCause() == null)
+ {
+ because = e.toString();
+ }
+ else
+ {
+ because = e.getCause().toString();
+ }
+
+ throw new AMQVMBrokerCreationException(port, because + " Stopped binding of InVM Qpid.AMQP");
}
}
else