You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2018/07/31 22:40:22 UTC
[couchdb] 01/02: Improve logging from test_util
This is an automated email from the ASF dual-hosted git repository.
wohali pushed a commit to branch 2.2.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit ef88643d86de50003e89e53aa3387d83f054bb5c
Author: ILYA Khlopotov <ii...@apache.org>
AuthorDate: Thu Jul 26 06:08:46 2018 -0700
Improve logging from test_util
Sometimes it is hard to guess what went wrong when application
started via `test_util:start_applications` or `test_util:start_couch`
is unable to start. Since the traceback was truncated.
This change would print the reason in addition to the traceback.
---
src/couch/src/test_util.erl | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/couch/src/test_util.erl b/src/couch/src/test_util.erl
index 738e9a3..efb5064 100644
--- a/src/couch/src/test_util.erl
+++ b/src/couch/src/test_util.erl
@@ -101,6 +101,9 @@ start_applications([App|Apps], Acc) ->
io:format(standard_error, "Application ~s was left running!~n", [App]),
application:stop(App),
start_applications([App|Apps], Acc);
+ {error, Reason} ->
+ io:format(standard_error, "Cannot start application '~s', reason ~p~n", [App, Reason]),
+ throw({error, {cannot_start, App, Reason}});
ok ->
start_applications(Apps, [App|Acc])
end.