path: root/src/libcamera
diff options
authorKieran Bingham <kieran.bingham@ideasonboard.com>2022-08-08 21:30:26 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2022-09-05 17:34:49 +0100
commit1a082a3e957bc669ae7b143e04d8d1012dddac4c (patch)
treed309a439c9f15a8309d6eebb4365fef005edc0bc /src/libcamera
parentda9bb8dea6821edcfd3464e8cba37ad4a91087d6 (diff)
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>
Diffstat (limited to 'src/libcamera')
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcamera/yaml_parser.cpp b/src/libcamera/yaml_parser.cpp
index 84cffd0d..d8a7c2f9 100644
--- a/src/libcamera/yaml_parser.cpp
+++ b/src/libcamera/yaml_parser.cpp
@@ -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;

Privacy Policy