You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2009/04/10 00:36:50 UTC

svn commit: r763833 - /couchdb/trunk/src/couchdb/couch_file.erl

Author: damien
Date: Thu Apr  9 22:36:49 2009
New Revision: 763833

URL: http://svn.apache.org/viewvc?rev=763833&view=rev
Log:
Fix to allow couch_file use in tests without the server being started.

Modified:
    couchdb/trunk/src/couchdb/couch_file.erl

Modified: couchdb/trunk/src/couchdb/couch_file.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_file.erl?rev=763833&r1=763832&r2=763833&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_file.erl (original)
+++ couchdb/trunk/src/couchdb/couch_file.erl Thu Apr  9 22:36:49 2009
@@ -315,7 +315,7 @@
     ok.
 
 track_stats() ->
-    try couch_stats_collector:increment({couchdb, open_os_files}) of
+    case (catch couch_stats_collector:increment({couchdb, open_os_files})) of
     ok ->
         Self = self(),
         spawn(
@@ -323,8 +323,8 @@
                 erlang:monitor(process, Self),
                 receive {'DOWN', _, _, _, _} -> ok end,
                 couch_stats_collector:decrement({couchdb, open_os_files})
-            end)
-    catch _ -> ok
+            end);
+     _ -> ok
     end.
 
 handle_call({pread, Pos, Bytes}, _From, Fd) ->