diff options
| author | Daniil Fedotov <hairyhum@gmail.com> | 2018-08-13 16:37:55 +0100 |
|---|---|---|
| committer | Daniil Fedotov <hairyhum@gmail.com> | 2018-08-14 14:19:42 +0100 |
| commit | 220ec77639236717bd1ce5367df0ce1851afb021 (patch) | |
| tree | b6d67f38e512553f2a9cd79303d46d10f77e2bf3 /src | |
| parent | 56a372cf045975426a13bc7e52d9ff00079af2a2 (diff) | |
| download | rabbitmq-server-git-220ec77639236717bd1ce5367df0ce1851afb021.tar.gz | |
Batch file syntax errors. Config check error format
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_config.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rabbit_config.erl b/src/rabbit_config.erl index cef75f1179..79f4a754bf 100644 --- a/src/rabbit_config.erl +++ b/src/rabbit_config.erl @@ -257,9 +257,13 @@ assert_config(Filename, Env) -> case filelib:is_regular(Filename) of true -> case file:consult(Filename) of - {ok, []} -> {error, "ERROR: Config file ~s should not be empty: ~s"}; + {ok, []} -> {error, + {"ERROR: Config file ~s should not be empty: ~s", + [Env, Filename]}}; {ok, [_]} -> ok; - {ok, [_|_]} -> {error, "ERROR: Config file ~s must contain ONE list ended by <dot>: ~s"}; + {ok, [_|_]} -> {error, + {"ERROR: Config file ~s must contain ONE list ended by <dot>: ~s", + [Env, Filename]}}; {error, {1, erl_parse, Err}} -> {error, {"ERROR: Unable to parse erlang terms from ~s file: ~s~n" "ERROR: Reason: ~p~n" |
