From patchwork Mon Aug 8 20:30:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 17029 X-Patchwork-Delegate: kieran.bingham@ideasonboard.com Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 52FFBC3272 for ; Mon, 8 Aug 2022 20:30:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AD0AF6332B; Mon, 8 Aug 2022 22:30:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1659990636; bh=E9oCWosy+n6yL6UPh2kbPoaGyoguSB+zQTmlQ04snSw=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=LxlD5HxYZPb675wMHWVchlOz18sRRmXNU1XTm2xRsmLivFt/D3AfYe8LPPgcN6loG UHEk8GlVGOgggZy2mXoqRNaQofBjQLHho6Lsn5DusyJs026hHzgwLFzb6o4UYUsm+w Xbs7effP1Bpkj5suIoIeGCql+4SGznfQ7iWLRWy2qzzX8mt1FHjIHQpf1Bd9GlgQaM v0k55cqKJbwjs1RjVUbwBcN/lAGZoxOkmf1QHaZ8rG/EQ2i2K1zEzq6WvDNEMaEhy7 iZ4rJfuzNKhGfrwyx+XHAvbMK3/1YUzcki9ehkEhLlEsjRSJEVUo7xT6UHwoFgMI2G t0r8InEbiFE8w== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 054A363315 for ; Mon, 8 Aug 2022 22:30:35 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="TRlvtmG6"; dkim-atps=neutral Received: from Monstersaurus.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7C7C5481; Mon, 8 Aug 2022 22:30:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1659990634; bh=E9oCWosy+n6yL6UPh2kbPoaGyoguSB+zQTmlQ04snSw=; h=From:To:Cc:Subject:Date:From; b=TRlvtmG6aztd1JpF1w3uFmnTRg95JmW2HKcwEPpLkYcBf5C6s2+yZhOiUzLYEn9LQ 7n4A3biKiSztk0Vw7bgn93YQA/pW+n/Sq3JA3UCKgT/IJl6q6MfFRH5vWnfftvUdHl QUaxlDpseXTvT+qdXpPHWyNJlVHviOHn4kyuLS6Q= To: libcamera devel Date: Mon, 8 Aug 2022 21:30:26 +0100 Message-Id: <20220808203026.2515013-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: yaml_parser: Report filename on failures X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Kieran Bingham via libcamera-devel From: Kieran Bingham Reply-To: Kieran Bingham Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 Reviewed-by: Laurent Pinchart Reviewed-by: Umang Jain --- This was failing for me while adding an IPU3 tuning file - with no indication as to where to look. src/libcamera/yaml_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/yaml_parser.cpp b/src/libcamera/yaml_parser.cpp index c96e99e1317c..dfbfac304d3d 100644 --- a/src/libcamera/yaml_parser.cpp +++ b/src/libcamera/yaml_parser.cpp @@ -807,7 +807,7 @@ std::unique_ptr YamlParser::parse(File &file) std::unique_ptr 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; }