diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-06-11 15:03:33 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-06-11 15:03:33 +0200 |
commit | c20acbf4d8ad72f4ca8fbd9917364f5474d2629e (patch) | |
tree | 710744b00c2880a2fe1196b71612317bf1c451bf /src | |
parent | Merge pull request #231 from hamano/case_clause_error_at_node_hometree_odbc (diff) |
Mention configuration file path in error messages
If reading or parsing a YAML configuration fails, log the full path to
the configuration file (as we do for old-style ".cfg" files).
Diffstat (limited to 'src')
-rw-r--r-- | src/ejabberd_config.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ejabberd_config.erl b/src/ejabberd_config.erl index c0b78d9ba..612cd84ce 100644 --- a/src/ejabberd_config.erl +++ b/src/ejabberd_config.erl @@ -186,7 +186,9 @@ consult(File) -> {ok, [Document|_]} -> {ok, Document}; {error, Err} -> - {error, p1_yaml:format_error(Err)} + Msg1 = "Cannot load " ++ File ++ ": ", + Msg2 = p1_yaml:format_error(Err), + {error, Msg1 ++ Msg2} end; _ -> case file:consult(File) of |