From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.10109.1604476387747895561 for ; Tue, 03 Nov 2020 23:53:08 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: mingyuex.liang@intel.com) IronPort-SDR: biIoaLAeR+V0nDCWule0z2Fllb2UGkRgHtLUZxq5mKINeG3GGsMN0woO0my2pJW5CfTfDkSxBL bNdBw0O9eikQ== X-IronPort-AV: E=McAfee;i="6000,8403,9794"; a="230805802" X-IronPort-AV: E=Sophos;i="5.77,450,1596524400"; d="scan'208";a="230805802" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2020 23:53:06 -0800 IronPort-SDR: Q+wven0AO7oMCvPBjnrtV3Al6sZHjg+GjGrz33mlFVBfVn9S2ziTL/OXvIZdgjtldOgUrrKTVJ AZbgz0iAkJFA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,450,1596524400"; d="scan'208";a="527474086" Received: from bob-desktop.ccr.corp.intel.com ([10.239.49.38]) by fmsmga006.fm.intel.com with ESMTP; 03 Nov 2020 23:53:05 -0800 From: mliang2x To: devel@edk2.groups.io Cc: Mingyue Liang , Bob Feng , Liming Gao , Yuwei Chen Subject: [PATCH] BaseTools: Catch the exception in build.py. Date: Wed, 4 Nov 2020 15:53:04 +0800 Message-Id: <20201104075304.382-1-mingyuex.liang@intel.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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