From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web12.11069.1604484482071481043 for ; Wed, 04 Nov 2020 02:08:02 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: mingyuex.liang@intel.com) IronPort-SDR: l6OnDH/iMd5W2ENYELLORWdT7vu+sQoLfDToxOTL5EEPw8aINcufANg6CCGb6XfZ+6vP0tMzKb j9hp0ivMFUmQ== X-IronPort-AV: E=McAfee;i="6000,8403,9794"; a="149046602" X-IronPort-AV: E=Sophos;i="5.77,450,1596524400"; d="scan'208";a="149046602" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2020 02:08:01 -0800 IronPort-SDR: iBUfZnlXKTfa1Nsv9lkKL1lXOYbCQZTMw4fg8wVsK2SXN7f4FHgguo70snbQ8zvfGy4fHLK4Vl WloRzVhQyTpw== X-IronPort-AV: E=Sophos;i="5.77,450,1596524400"; d="scan'208";a="538856569" 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:07:59 -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 18:07:48 +0800 Message-Id: <20201104100748.1622-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