From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web08.6083.1646124513862334541 for ; Tue, 01 Mar 2022 00:48:34 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=W2TxUXNa; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: yuwei.chen@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646124513; x=1677660513; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=E/VVJyKjOe6bVeC/YIG4/oZspMmnpUA1ALqCahMOGYo=; b=W2TxUXNat5fYTonY4+BBrOwuLeDjjb65U1Hv9KvEFjbovmKi96IKC3tI hWuJO750mj2wdmOZ7mEfscUimXWhnn5qbkm3+2G5RR3agPb93pMv6z2A+ G3pvKe1JL08eZwZfyG2Al80PYqQ9Gs4VrW9i619azczkWnaKTFehkbqwp 7iHCSs3Kv026FBPbzXTW5NqbwpG8QFimLVwq1FpwXN+jp4A5qBhQY5+he 9LSyfQ3+TRBhB4A18D5MtI1qc5o4pwOz7XtGpinq+sSvM8mAM+Ea7nFnl fqnXnZEouWsB9i4c+ME7H7tZgLX1kArA+khaHYyVxszFftLRSmSDkDwAC Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10272"; a="233060965" X-IronPort-AV: E=Sophos;i="5.90,145,1643702400"; d="scan'208";a="233060965" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2022 00:48:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,145,1643702400"; d="scan'208";a="550625855" Received: from yuweipc.ccr.corp.intel.com ([10.239.158.34]) by orsmga008.jf.intel.com with ESMTP; 01 Mar 2022 00:48:31 -0800 From: "Yuwei Chen" To: devel@edk2.groups.io Cc: MingYue Liang , Bob Feng , Liming Gao Subject: [PATCH] BaseTools: Catch the exception in build.py. Date: Tue, 1 Mar 2022 16:48:26 +0800 Message-Id: <20220301084826.1859-1-yuwei.chen@intel.com> X-Mailer: git-send-email 2.27.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: MingYue Liang REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2988 In FDF file, if INF key word is wrongly written as INT, build tool will report the execption. Build tool should report the error message. build.py In order to capture and handle the exception of fdfparser, the user-defined exception class should be imported. Signed-off-by: Mingyue Liang Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen --- BaseTools/Source/Python/build/build.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index 07187c0361..0c6f801b33 100755 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -63,6 +63,8 @@ from GenFds.FdfParser import FdfParser from AutoGen.IncludesAutoGen import IncludesAutoGen from GenFds.GenFds import resetFdsGlobalVariable from AutoGen.AutoGen import CalculatePriorityValue +from GenFds.FdfParser import Warning + ## standard targets of build command gSupportedTarget = ['all', 'genc', 'genmake', 'modules', 'libraries', 'fds', 'clean', 'cleanall', 'cleanlib', 'run'] -- 2.26.2.windows.1