From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web12.11127.1604485019478087952 for ; Wed, 04 Nov 2020 02:16:59 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: mingyuex.liang@intel.com) IronPort-SDR: 0RTUShWiKDaFktKKeu8holGS+uYpfd4ZKF8KL2r4AnvchDBcuJMT0Wx0cS/NQClnStcOexjYs5 hl6LF7t9C6mQ== X-IronPort-AV: E=McAfee;i="6000,8403,9794"; a="187054701" X-IronPort-AV: E=Sophos;i="5.77,450,1596524400"; d="scan'208";a="187054701" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2020 02:16:58 -0800 IronPort-SDR: 6OIn5GN5RvB6B8Bcynw3O+RGfYro43dpyebdKbolUDB7A3An1Pi1goA4UC+SN2Vha/f3ilnJY2 LUPl3sCTXwzQ== X-IronPort-AV: E=Sophos;i="5.77,450,1596524400"; d="scan'208";a="538862940" Received: from bob-desktop.ccr.corp.intel.com ([10.239.49.38]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2020 02:16:56 -0800 From: Mingyue Liang To: devel@edk2.groups.io Cc: mliang2x , Bob Feng , Liming Gao , Yuwei Chen Subject: [PATCH] BaseTools: Catch the exception in build.py. Date: Wed, 4 Nov 2020 18:16:52 +0800 Message-Id: <20201104101652.606-1-mingyuex.liang@intel.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: mliang2x 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index 1ab1e60a64..49165ea355 100755 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -62,6 +62,7 @@ from AutoGen.ModuleAutoGenHelper import WorkSpaceInfo, PlatformInfo from GenFds.FdfParser import FdfParser from AutoGen.IncludesAutoGen import IncludesAutoGen from GenFds.GenFds import resetFdsGlobalVariable +from GenFds.FdfParser import Warning ## standard targets of build command gSupportedTarget = ['all', 'genc', 'genmake', 'modules', 'libraries', 'fds', 'clean', 'cleanall', 'cleanlib', 'run'] -- 2.28.0.windows.1