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 15:23:57 UTC

[tika] branch master updated: include "caused by" exceptions when catching/rethrowing in emf/wmf

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

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

The following commit(s) were added to refs/heads/master by this push:
       new  104ca3e   include "caused by" exceptions when catching/rethrowing in emf/wmf
       new  b0a4b95   Merge remote-tracking branch 'origin/master'
104ca3e is described below

commit 104ca3ef6480528ac22c1426d3a3ecfb184d5161
Author: tballison <ta...@mitre.org>
AuthorDate: Mon May 1 11:22:03 2017 -0400

    include "caused by" exceptions when catching/rethrowing in emf/wmf
---
 .../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-parsers/src/main/java/org/apache/tika/parser/microsoft/EMFParser.java b/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/EMFParser.java
index be4bc14..6c967e3 100644
--- a/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/EMFParser.java
+++ b/tika-parsers/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-parsers/src/main/java/org/apache/tika/parser/microsoft/WMFParser.java b/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/WMFParser.java
index 68388a3..33fbbd4 100644
--- a/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/WMFParser.java
+++ b/tika-parsers/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>'].