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 <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -915,6 +915,8 @@ class DscParser(MetaFileParser):
|
||||
elif Line[0] == '!':
|
||||
self._DirectiveParser()
|
||||
continue
|
||||
if Line[0] == TAB_OPTION_START and not self._InSubsection:
|
||||
EdkLogger.error("Parser", FILE_READ_FAILURE, "Missing the '{' before %s in Line %s" % (Line, Index+1),ExtraData=self.MetaFile)
|
||||
|
||||
if self._InSubsection:
|
||||
SectionType = self._SubsectionType
|
||||
|
Reference in New Issue
Block a user