You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2017/05/01 16:20:46 UTC

[tika] branch 2.x updated: TIKA-2348 -- include caught exception in EMF/WMF rethrows

This is an automated email from the ASF dual-hosted git repository.

tallison pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/tika.git

The following commit(s) were added to refs/heads/2.x by this push:
       new  4e1e87f   TIKA-2348 -- include caught exception in EMF/WMF rethrows
4e1e87f is described below

commit 4e1e87ff25dac1c5e85bfd49ee06a38dcab0680e
Author: tballison <ta...@mitre.org>
AuthorDate: Mon May 1 12:20:37 2017 -0400

    TIKA-2348 -- include caught exception in EMF/WMF rethrows
---
 .../src/main/java/org/apache/tika/parser/microsoft/EMFParser.java   | 4 ++--
 .../src/main/java/org/apache/tika/parser/microsoft/WMFParser.java   | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/EMFParser.java b/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/EMFParser.java
index be4bc14..6c967e3 100644
--- a/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/EMFParser.java
+++ b/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/EMFParser.java
@@ -117,9 +117,9 @@ public class EMFParser extends AbstractParser {
                 xhtml.endElement("p");
             }
         } catch (RecordFormatException e) { //POI's hemfparser can throw these for "parse exceptions"
-            throw new TikaException(e.getMessage());
+            throw new TikaException(e.getMessage(), e);
         } catch (RuntimeException e) { //convert Runtime to RecordFormatExceptions
-            throw new TikaException(e.getMessage());
+            throw new TikaException(e.getMessage(), e);
         }
         xhtml.endDocument();
     }
diff --git a/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/WMFParser.java b/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/WMFParser.java
index 68388a3..33fbbd4 100644
--- a/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/WMFParser.java
+++ b/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/WMFParser.java
@@ -86,11 +86,11 @@ public class WMFParser extends AbstractParser {
                 }
             }
         } catch (RecordFormatException e) { //POI's hwmfparser can throw these for "parse exceptions"
-            throw new TikaException(e.getMessage());
+            throw new TikaException(e.getMessage(), e);
         } catch (RuntimeException e) { //convert Runtime to RecordFormatExceptions
-            throw new TikaException(e.getMessage());
+            throw new TikaException(e.getMessage(), e);
         } catch (AssertionError e) { //POI's hwmfparser can throw these for parse exceptions
-            throw new TikaException(e.getMessage());
+            throw new TikaException(e.getMessage(), e);
         }
         xhtml.endDocument();
     }

-- 
To stop receiving notification emails like this one, please contact
['"commits@tika.apache.org" <co...@tika.apache.org>'].