libcamera: yaml_parser: Report filename on failures

It can be helpful to know 'which' file failed to parse if there is a
failure.

Report it to the user in the error message.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
Kieran Bingham 2022-08-08 21:30:26 +01:00
parent da9bb8dea6
commit 1a082a3e95

View file

@ -841,7 +841,9 @@ std::unique_ptr<YamlObject> YamlParser::parse(File &file)
std::unique_ptr<YamlObject> root(new YamlObject());
if (context.parseContent(*root)) {
LOG(YamlParser, Error) << "Failed to parse YAML content";
LOG(YamlParser, Error)
<< "Failed to parse YAML content from "
<< file.fileName();
return nullptr;
}