couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r763833 - /couchdb/trunk/src/couchdb/couch_file.erl
Date Thu, 09 Apr 2009 22:36:50 GMT
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) ->



Mime
View raw message