diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-29 12:07:23 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-29 12:08:08 +0200 |
commit | 40861378a22503b58c7c6dd1f691fc824697c1db (patch) | |
tree | e80f979a64d05fa94b5c7ecd0f7db1825aaea19f /xmerge | |
parent | d5a252dcff1c202363652340b4f0e0cdd6d68e95 (diff) |
fix more Java1.5 incompatibility
Change-Id: I32881e06d278df6319822a5ecf282aa97cf24bc8
Diffstat (limited to 'xmerge')
-rw-r--r-- | xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java | 4 | ||||
-rw-r--r-- | xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java index cbade8a53ffc..f722732be8c3 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java @@ -298,7 +298,9 @@ public class DOMDocument catch (Exception e) { // We may get some other errors, but the bottom line is that // the steps being executed no longer work - throw new IOException(e); + IOException newEx = new IOException(e.getMessage()); + newEx.initCause(e); + throw newEx; } byte bytes[] = baos.toByteArray(); diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java index d468b426ac45..706b58d18cc1 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java @@ -813,14 +813,18 @@ public abstract class OfficeDocument return writer.toString().getBytes(); } catch (Exception e) { // We don't have another parser - throw new IOException("No appropriate API (JAXP/Xerces) to serialize XML document: " + domImpl, e); + IOException newEx = new IOException("No appropriate API (JAXP/Xerces) to serialize XML document: " + domImpl); + newEx.initCause(e); + throw newEx; } } } catch (Exception e) { // We may get some other errors, but the bottom line is that // the steps being executed no longer work - throw new IOException(e); + IOException newEx = new IOException(e.getMessage()); + newEx.initCause(e); + throw newEx; } byte bytes[] = baos.toByteArray(); |