summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2010-11-08 22:13:33 +0000
committerAdam Kocoloski <kocolosk@apache.org>2010-11-08 22:13:33 +0000
commit3a5ef653409c167cbcc6ec352e3a32467420fd56 (patch)
treed276a7c087142680ca6e3de852d81958d020a5d0 /src
parent4c6355483d3e97971a97a9a3935263ecf47f7ca8 (diff)
shut down couch_view_group cleanly if no_db_file
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1032764 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_view_group.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/couchdb/couch_view_group.erl b/src/couchdb/couch_view_group.erl
index cc12fc20..a79bbe7a 100644
--- a/src/couchdb/couch_view_group.erl
+++ b/src/couchdb/couch_view_group.erl
@@ -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.