From d429fcd0d25936ff5861e9c6e37f7cf9285217b2 Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Fri, 15 Apr 2016 16:46:48 +0800 Subject: BaseTools: enhance error handling for DSC file Add logic for DSC file validation for Prebuild init. Add logic to detect error for DSC parser when '{' is missing. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/build/build.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'BaseTools/Source/Python/build/build.py') diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index 37ce8e16aa..07891dafdb 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -920,6 +920,9 @@ class Build(): def InitPreBuild(self): self.LoadConfiguration() + ErrorCode, ErrorInfo = self.PlatformFile.Validate(".dsc", False) + if ErrorCode != 0: + EdkLogger.error("build", ErrorCode, ExtraData=ErrorInfo) if self.BuildTargetList: GlobalData.gGlobalDefines['TARGET'] = self.BuildTargetList[0] if self.ArchList: -- cgit v1.2.3