From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.6634.1604452207118550371 for ; Tue, 03 Nov 2020 17:10:07 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: mingyuex.liang@intel.com) IronPort-SDR: vl9eRQ8vSdDNWiU5WbhXTpQe7gkKNivi7V50m0VriHjgXa7Q6PiBnZw53p85zhGhCuA1mH5M8x jV7MWkB6LfTw== X-IronPort-AV: E=McAfee;i="6000,8403,9794"; a="253860916" X-IronPort-AV: E=Sophos;i="5.77,449,1596524400"; d="scan'208";a="253860916" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2020 17:10:05 -0800 IronPort-SDR: aGFdHJA+y0+ZQVer3/jQm4FdDhixCW1iyA7EugiKlDDZF5iz7CI+bAh5rWZCLDW7n5gr0kPuQZ iPL8dSsB6F2g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,449,1596524400"; d="scan'208";a="325427284" Received: from unknown (HELO bob-desktop.ccr.corp.intel.com) ([10.239.49.38]) by orsmga006.jf.intel.com with ESMTP; 03 Nov 2020 17:10:04 -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 09:10:04 +0800 Message-Id: <20201104011004.62-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