From 3a5ef653409c167cbcc6ec352e3a32467420fd56 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Mon, 8 Nov 2010 22:13:33 +0000 Subject: 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 --- src/couchdb/couch_view_group.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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. -- cgit v1.2.3