diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-16 12:19:14 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-10-16 12:27:15 +0200 |
commit | 9341bf3dc38b2cc117ffbe12ff057511ed6e046d (patch) | |
tree | 3a54c1764eb0e3106695292a737944507d3b4fb6 /reportbuilder/java/org/libreoffice/report/StorageRepository.java | |
parent | b2f69f626409442d1f0ca5049b946946ce9b01d8 (diff) |
java: when rethrowing, store the original exception
Change-Id: I34ce000c48d2d79bfec854c8dd55d12f2bee29c7
Diffstat (limited to 'reportbuilder/java/org/libreoffice/report/StorageRepository.java')
-rw-r--r-- | reportbuilder/java/org/libreoffice/report/StorageRepository.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/reportbuilder/java/org/libreoffice/report/StorageRepository.java b/reportbuilder/java/org/libreoffice/report/StorageRepository.java index 2f3e4249fd59..1ccfc5253f77 100644 --- a/reportbuilder/java/org/libreoffice/report/StorageRepository.java +++ b/reportbuilder/java/org/libreoffice/report/StorageRepository.java @@ -87,9 +87,11 @@ public class StorageRepository implements InputRepository, OutputRepository final XStream xStream = UnoRuntime.queryInterface(XStream.class, input.openStreamElement(name, ElementModes.READ)); return new BufferedInputStream(new XInputStreamToInputStreamAdapter(xStream.getInputStream()), 102400); } - catch (com.sun.star.uno.Exception e) + catch (com.sun.star.uno.Exception ex1) { - throw new IOException("createInputStream"); + java.io.IOException ex2 = new java.io.IOException(); + ex2.initCause(ex1); + throw ex2; } } @@ -116,9 +118,11 @@ public class StorageRepository implements InputRepository, OutputRepository } return new BufferedOutputStream(new XOutputStreamToOutputStreamAdapter(stream.getOutputStream()), 204800); } - catch (com.sun.star.uno.Exception e) + catch (com.sun.star.uno.Exception ex1) { - throw new IOException("createOutputStream"); + java.io.IOException ex2 = new java.io.IOException(); + ex2.initCause(ex1); + throw ex2; } } |