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.web08.9505.1604471532295707111 for ; Tue, 03 Nov 2020 22:32:12 -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: ylLTrxG3Bwdtgk1dU0026lodd9YUvOakTk03xDwGMEtsZcX11rqnsAPzZi8K4y6SOOeQCJ0nzv lENCYX5ieuEQ== X-IronPort-AV: E=McAfee;i="6000,8403,9794"; a="187031413" X-IronPort-AV: E=Sophos;i="5.77,450,1596524400"; d="scan'208";a="187031413" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2020 22:32:10 -0800 IronPort-SDR: kCddjpt9QsHl70hcsJvg4obiV/p04SPu5mcBO3nJUs51fZCGpxaON6CJ4J8vG3hIRZBmR8+ee4 wlstViDRC0Ng== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,450,1596524400"; d="scan'208";a="527455482" Received: from bob-desktop.ccr.corp.intel.com ([10.239.49.38]) by fmsmga006.fm.intel.com with ESMTP; 03 Nov 2020 22:32:09 -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 14:32:08 +0800 Message-Id: <20201104063208.363-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