summaryrefslogtreecommitdiff
path: root/java/client/example/src
diff options
context:
space:
mode:
authorRobert Greig <rgreig@apache.org>2007-04-09 15:26:04 +0000
committerRobert Greig <rgreig@apache.org>2007-04-09 15:26:04 +0000
commitf966c066fc10c1510c244c41958e343c682dd1a1 (patch)
treeff0d2818fe3729bb6ebdfcb8d654d17b8599538f /java/client/example/src
parentb8b2e032a4a6a6ad796ce6247c581a0498b5c264 (diff)
downloadqpid-python-f966c066fc10c1510c244c41958e343c682dd1a1.tar.gz
Stopped throwing away exception causes.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2@526776 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/example/src')
-rw-r--r--java/client/example/src/main/java/org/apache/qpid/example/publisher/FileMessageFactory.java4
-rw-r--r--java/client/example/src/main/java/org/apache/qpid/example/shared/InitialContextHelper.java4
2 files changed, 5 insertions, 3 deletions
diff --git a/java/client/example/src/main/java/org/apache/qpid/example/publisher/FileMessageFactory.java b/java/client/example/src/main/java/org/apache/qpid/example/publisher/FileMessageFactory.java
index 88bcbbbccb..f3b21e3c64 100644
--- a/java/client/example/src/main/java/org/apache/qpid/example/publisher/FileMessageFactory.java
+++ b/java/client/example/src/main/java/org/apache/qpid/example/publisher/FileMessageFactory.java
@@ -47,7 +47,9 @@ public class FileMessageFactory
}
catch (IOException e)
{
- throw new MessageFactoryException(e.toString());
+ MessageFactoryException mfe = new MessageFactoryException(e.toString());
+ mfe.initCause(e);
+ throw mfe;
}
}
diff --git a/java/client/example/src/main/java/org/apache/qpid/example/shared/InitialContextHelper.java b/java/client/example/src/main/java/org/apache/qpid/example/shared/InitialContextHelper.java
index 8505d1d457..98a2c0d497 100644
--- a/java/client/example/src/main/java/org/apache/qpid/example/shared/InitialContextHelper.java
+++ b/java/client/example/src/main/java/org/apache/qpid/example/shared/InitialContextHelper.java
@@ -59,11 +59,11 @@ public class InitialContextHelper
}
catch (IOException e)
{
- throw new ContextException(e.toString());
+ throw new ContextException(e.toString(), e);
}
catch (NamingException n)
{
- throw new ContextException(n.toString());
+ throw new ContextException(n.toString(), n);
}
}