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).
This commit is contained in:
Holger Weiss 2014-06-11 15:03:33 +02:00
parent e66899e68e
commit c20acbf4d8
1 changed files with 3 additions and 1 deletions

View File

@ -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