svn commit: r479451 - /xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionConfiguration.java

[email protected]
Newsgroups gmane.text.xml.xindice.devel
Message-ID <[email protected]>
Author: vgritsenko
Date: Sun Nov 26 15:11:42 2006
New Revision: 479451

URL: http://svn.apache.org/viewvc?view=rev&rev=479451
Log:
fix failing xmlrpc test

Modified:
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionConfiguration.java

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionConfiguration.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionConfiguration.java?view=diff&rev=479451&r1=479450&r2=479451
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionConfiguration.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionConfiguration.java Sun Nov 26 15:11:42 2006
@@ -13,18 +13,21 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  *
- * CVS $Id$
+ * $Id$
  */
 
 package org.apache.xindice.server.rpc.messages;
 
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
 
+import org.xmldb.api.base.XMLDBException;
+import org.xmldb.api.base.ErrorCodes;
+
 import java.util.Hashtable;
 
 /**
  *
- * @version CVS $Revision$, $Date$
+ * @version $Revision$, $Date$
  */
 public class GetCollectionConfiguration extends RPCDefaultMessage {
 
@@ -39,6 +42,11 @@
             /* getCollection() throws an exception if collection doesnt exist */
             getCollection((String) message.get(COLLECTION));
             result.put(RESULT, "yes");
+        } catch (XMLDBException e) {
+            if (e.errorCode == ErrorCodes.NO_SUCH_DATABASE) {
+                throw e;
+            }
+            result.put(RESULT, "no");
         } catch (Exception e) {
             result.put(RESULT, "no");
         }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.