couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject svn commit: r1032764 - /couchdb/trunk/src/couchdb/couch_view_group.erl
Date Mon, 08 Nov 2010 22:13:33 GMT
Author: kocolosk
Date: Mon Nov  8 22:13:33 2010
New Revision: 1032764

URL: http://svn.apache.org/viewvc?rev=1032764&view=rev
Log:
shut down couch_view_group cleanly if no_db_file

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

Modified: couchdb/trunk/src/couchdb/couch_view_group.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_view_group.erl?rev=1032764&r1=1032763&r2=1032764&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_view_group.erl (original)
+++ couchdb/trunk/src/couchdb/couch_view_group.erl Mon Nov  8 22:13:33 2010
@@ -77,7 +77,7 @@ start_link(InitArgs) ->
 % init creates a closure which spawns the appropriate view_updater.
 init({InitArgs, ReturnPid, Ref}) ->
     process_flag(trap_exit, true),
-    case prepare_group(InitArgs, false) of
+    try prepare_group(InitArgs, false) of
     {ok, #group{db=Db, fd=Fd, current_seq=Seq}=Group} ->
         case Seq > couch_db:get_update_seq(Db) of
         true ->
@@ -95,6 +95,9 @@ init({InitArgs, ReturnPid, Ref}) ->
     Error ->
         ReturnPid ! {Ref, self(), Error},
         ignore
+    catch exit:no_db_file ->
+        ReturnPid ! {Ref, self(), {error, no_db_file}},
+        ignore
     end.
 
 



Mime
View raw message