mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-20 10:55:07 +03:00
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:
parent
da9bb8dea6
commit
1a082a3e95
1 changed files with 3 additions and 1 deletions
|
@ -841,7 +841,9 @@ std::unique_ptr<YamlObject> YamlParser::parse(File &file)
|
||||||
std::unique_ptr<YamlObject> root(new YamlObject());
|
std::unique_ptr<YamlObject> root(new YamlObject());
|
||||||
|
|
||||||
if (context.parseContent(*root)) {
|
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;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue