From f966c066fc10c1510c244c41958e343c682dd1a1 Mon Sep 17 00:00:00 2001 From: Robert Greig Date: Mon, 9 Apr 2007 15:26:04 +0000 Subject: Stopped throwing away exception causes. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2@526776 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/qpid/example/publisher/FileMessageFactory.java | 4 +++- .../java/org/apache/qpid/example/shared/InitialContextHelper.java | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'java/client/example') 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); } } -- cgit v1.2.1