You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by au...@apache.org on 2012/07/19 20:59:19 UTC

svn commit: r1363477 - in /opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools: dictionary/serializer/DictionarySerializer.java formats/frenchtreebank/ConstitParseSampleStream.java

Author: autayeu
Date: Thu Jul 19 18:59:19 2012
New Revision: 1363477

URL: http://svn.apache.org/viewvc?rev=1363477&view=rev
Log:
OPENNLP-525: Exception cleanup in opennlp-tools. Thanks to Daniel Naber for the patch. Downgrade for Java5.

Modified:
    opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/dictionary/serializer/DictionarySerializer.java
    opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/formats/frenchtreebank/ConstitParseSampleStream.java

Modified: opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/dictionary/serializer/DictionarySerializer.java
URL: http://svn.apache.org/viewvc/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/dictionary/serializer/DictionarySerializer.java?rev=1363477&r1=1363476&r2=1363477&view=diff
==============================================================================
--- opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/dictionary/serializer/DictionarySerializer.java (original)
+++ opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/dictionary/serializer/DictionarySerializer.java Thu Jul 19 18:59:19 2012
@@ -299,7 +299,7 @@ public class DictionarySerializer {
       hd.endDocument();
     }
     catch (SAXException e) {
-      throw new IOException("There was an error during serialization!", e);
+      throw new IOException("Error during serialization: " + e.getMessage());
     }
   }
 

Modified: opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/formats/frenchtreebank/ConstitParseSampleStream.java
URL: http://svn.apache.org/viewvc/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/formats/frenchtreebank/ConstitParseSampleStream.java?rev=1363477&r1=1363476&r2=1363477&view=diff
==============================================================================
--- opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/formats/frenchtreebank/ConstitParseSampleStream.java (original)
+++ opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/formats/frenchtreebank/ConstitParseSampleStream.java Thu Jul 19 18:59:19 2012
@@ -63,7 +63,7 @@ public class ConstitParseSampleStream ex
         try {
           saxParser.parse(new ByteArrayInputStream(xmlbytes), new ConstitDocumentHandler(producedParses));
         } catch (SAXException e) {
-          throw new IOException(e);
+          throw new IOException(e.getMessage());
         }
         
         parses.addAll(producedParses);