From c20acbf4d8ad72f4ca8fbd9917364f5474d2629e Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Wed, 11 Jun 2014 15:03:33 +0200 Subject: [PATCH] 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). --- src/ejabberd_config.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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