Report errors in fabric_db_update_listener If we encountered an error in fabric_db_update_listener we would silently return without reporting an error. This just throws any sort of error response that we might encounter.
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/95dae3cf Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/95dae3cf Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/95dae3cf Branch: refs/heads/import Commit: 95dae3cf45be5f364d777e5e2973c546a2d577f8 Parents: ed385ea Author: Paul J. Davis <paul.joseph.da...@gmail.com> Authored: Mon Nov 26 12:10:41 2012 -0600 Committer: Paul J. Davis <paul.joseph.da...@gmail.com> Committed: Mon Nov 26 14:19:57 2012 -0600 ---------------------------------------------------------------------- src/fabric_db_update_listener.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/95dae3cf/src/fabric_db_update_listener.erl ---------------------------------------------------------------------- diff --git a/src/fabric_db_update_listener.erl b/src/fabric_db_update_listener.erl index b041560..88d3bab 100644 --- a/src/fabric_db_update_listener.erl +++ b/src/fabric_db_update_listener.erl @@ -39,11 +39,16 @@ go(Parent, ParentRef, DbName, Timeout) -> %% process to communicate via handle_message/3 we "fake" it as a %% a spawned worker. Workers = [#worker{ref=ParentRef, pid=Parent} | Notifiers], - try + Resp = try receive_results(Workers, #acc{parent=Parent, state=unset}, Timeout) after rexi_monitor:stop(RexiMon), stop_cleanup_monitor(MonPid) + end, + case Resp of + {ok, _} -> ok; + {error, Error} -> erlang:error(Error); + Error -> erlang:error(Error) end. start_update_notifiers(DbName) ->