Re: empty catch block - can we at least put a notice of why we're not doing anything with that exception? And what happens if its a runtimeexception? Is there something more specific we can catch than Exception?
- Dan

[EMAIL PROTECTED] wrote:
Author: jmsnell
Date: Tue Feb 12 15:10:01 2008
New Revision: 627173

URL: http://svn.apache.org/viewvc?rev=627173&view=rev
Log:
mention that the html and json jars are also required
handle an error condition properly in getEntry

Modified:
    incubator/abdera/java/trunk/adapters/couchdb/readme
    
incubator/abdera/java/trunk/adapters/couchdb/src/main/java/org/apache/abdera/protocol/server/adapters/couchdb/CouchDbAdapter.java

Modified: incubator/abdera/java/trunk/adapters/couchdb/readme
URL: 
http://svn.apache.org/viewvc/incubator/abdera/java/trunk/adapters/couchdb/readme?rev=627173&r1=627172&r2=627173&view=diff
==============================================================================
--- incubator/abdera/java/trunk/adapters/couchdb/readme (original)
+++ incubator/abdera/java/trunk/adapters/couchdb/readme Tue Feb 12 15:10:01 2008
@@ -3,6 +3,7 @@
Dependencies: * Abdera Core, Parser, Protocol, Server modules
+  * Abdera json and html extensions
   * CouchDb4J 
(http://www.couchdbwiki.com/index.php?title=Getting_Started_with_Java)
Using the Adapter:

Modified: 
incubator/abdera/java/trunk/adapters/couchdb/src/main/java/org/apache/abdera/protocol/server/adapters/couchdb/CouchDbAdapter.java
URL: 
http://svn.apache.org/viewvc/incubator/abdera/java/trunk/adapters/couchdb/src/main/java/org/apache/abdera/protocol/server/adapters/couchdb/CouchDbAdapter.java?rev=627173&r1=627172&r2=627173&view=diff
==============================================================================
--- 
incubator/abdera/java/trunk/adapters/couchdb/src/main/java/org/apache/abdera/protocol/server/adapters/couchdb/CouchDbAdapter.java
 (original)
+++ 
incubator/abdera/java/trunk/adapters/couchdb/src/main/java/org/apache/abdera/protocol/server/adapters/couchdb/CouchDbAdapter.java
 Tue Feb 12 15:10:01 2008
@@ -212,7 +212,10 @@
       String entry = target.getParameter("entry");
       Session session = new Session(host,port);
       Database db = session.getDatabase(feed);
-      Document doc = db.getDocument(entry);
+      Document doc = null;
+      try {
+        doc = db.getDocument(entry);
+      } catch (Exception e) {}
       if (doc != null)
         return new JsonObjectResponseContext(
           request.getAbdera(),




--
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com/blog

Reply via email to