You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by vl...@apache.org on 2002/11/19 06:22:19 UTC
cvs commit: xml-xindice/java/src/org/apache/xindice/client/xmldb DatabaseImpl.java ResourceSetImpl.java
vladimir 2002/11/18 21:22:19
Modified: java/src/org/apache/xindice/client/xmldb DatabaseImpl.java
ResourceSetImpl.java
Log:
Use new chained exception from XMLDBException
Revision Changes Path
1.10 +9 -2 xml-xindice/java/src/org/apache/xindice/client/xmldb/DatabaseImpl.java
Index: DatabaseImpl.java
===================================================================
RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/client/xmldb/DatabaseImpl.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- DatabaseImpl.java 31 Oct 2002 06:58:48 -0000 1.9
+++ DatabaseImpl.java 19 Nov 2002 05:22:19 -0000 1.10
@@ -62,6 +62,8 @@
import org.xmldb.api.base.Database;
import org.xmldb.api.base.ErrorCodes;
import org.xmldb.api.base.XMLDBException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* DatabaseImpl is the XML:DB driver implementation for Xindice. It is the entry
@@ -79,6 +81,8 @@
public class DatabaseImpl extends CommonConfigurable
implements Database {
+ private static Log log = LogFactory.getLog("org.apache.xindice.client.xmldb");
+
protected Database driver;
/**
@@ -193,7 +197,10 @@
}
}
catch (Exception e) {
- throw new XMLDBException(ErrorCodes.INVALID_URI, uri);
+ if (log.isInfoEnabled()) {
+ log.info("Exception during creation of the Database", e);
+ }
+ throw new XMLDBException(ErrorCodes.INVALID_URI, uri, e);
}
}
}
1.6 +2 -2 xml-xindice/java/src/org/apache/xindice/client/xmldb/ResourceSetImpl.java
Index: ResourceSetImpl.java
===================================================================
RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/client/xmldb/ResourceSetImpl.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ResourceSetImpl.java 31 Oct 2002 06:58:48 -0000 1.5
+++ ResourceSetImpl.java 19 Nov 2002 05:22:19 -0000 1.6
@@ -143,7 +143,7 @@
resources.add(resource);
}
catch (Exception e) {
- throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR);
+ throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e);
}
}
}