diff options
author | ILYA Khlopotov <iilyak@apache.org> | 2018-07-26 06:08:46 -0700 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2018-07-29 18:55:14 +0200 |
commit | 56bd13d0d61c142eeae3a03da26f2f17a5d6ece8 (patch) | |
tree | 3e5b8bbfcdac992acdaaafdf595cfd3f08b5a22a | |
parent | 10c19dc5cbcb390d286b9a69a2c23b1bc77368ab (diff) | |
download | couchdb-56bd13d0d61c142eeae3a03da26f2f17a5d6ece8.tar.gz |
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.
-rw-r--r-- | src/couch/src/test_util.erl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/couch/src/test_util.erl b/src/couch/src/test_util.erl index 738e9a3fb..efb506460 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. |