From 07cc904637aedf1ba0577a2aaa4574f593ef0007 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Fri, 2 Jul 2010 12:53:53 -0400 Subject: better error logging for failed RPC requests --- src/fabric_rpc.erl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/fabric_rpc.erl') diff --git a/src/fabric_rpc.erl b/src/fabric_rpc.erl index 1a2edf77..948bc54b 100644 --- a/src/fabric_rpc.erl +++ b/src/fabric_rpc.erl @@ -203,7 +203,15 @@ group_info(DbName, Group0) -> with_db(DbName, Options, {M,F,A}) -> case couch_db:open(DbName, Options) of {ok, Db} -> - rexi:reply(apply(M, F, [Db | A])); + rexi:reply(try + apply(M, F, [Db | A]) + catch Exception -> + Exception; + error:Reason -> + ?LOG_ERROR("~p ~p ~p~n~p", [?MODULE, {M,F}, Reason, + erlang:get_stacktrace()]), + {error, Reason} + end); Error -> rexi:reply(Error) end. -- cgit v1.2.3