You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by gs...@apache.org on 2010/11/17 16:20:36 UTC
svn commit: r1036075 - in
/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes:
datastore/InMemoryBayesDatastore.java
exceptions/InvalidDatastoreException.java
Author: gsingers
Date: Wed Nov 17 15:20:36 2010
New Revision: 1036075
URL: http://svn.apache.org/viewvc?rev=1036075&view=rev
Log:
throw a better exception
Modified:
mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/datastore/InMemoryBayesDatastore.java
mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/exceptions/InvalidDatastoreException.java
Modified: mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/datastore/InMemoryBayesDatastore.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/datastore/InMemoryBayesDatastore.java?rev=1036075&r1=1036074&r2=1036075&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/datastore/InMemoryBayesDatastore.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/datastore/InMemoryBayesDatastore.java Wed Nov 17 15:20:36 2010
@@ -79,7 +79,7 @@ public class InMemoryBayesDatastore impl
try {
SequenceFileModelReader.loadModel(this, FileSystem.get(new Path(basePath).toUri(), conf), params, conf);
} catch (IOException e) {
- throw new InvalidDatastoreException(e.getMessage());
+ throw new InvalidDatastoreException(e);
}
for (String label : getKeys("")) {
log.info("{} {} {} {}", new Object[] {
Modified: mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/exceptions/InvalidDatastoreException.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/exceptions/InvalidDatastoreException.java?rev=1036075&r1=1036074&r2=1036075&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/exceptions/InvalidDatastoreException.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/exceptions/InvalidDatastoreException.java Wed Nov 17 15:20:36 2010
@@ -28,4 +28,12 @@ public final class InvalidDatastoreExcep
public InvalidDatastoreException(String message) {
super(message);
}
+
+ public InvalidDatastoreException(String msg, Throwable throwable) {
+ super(msg, throwable);
+ }
+
+ public InvalidDatastoreException(Throwable throwable) {
+ super(throwable);
+ }
}