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:
@ -3012,10 +3012,9 @@ determine whether database file is out of date!\n")
|
||||
return PlatformList
|
||||
|
||||
def _MapPlatform(self, Dscfile):
|
||||
try:
|
||||
Platform = self.BuildObject[PathClass(Dscfile), 'COMMON']
|
||||
except:
|
||||
Platform = None
|
||||
Platform = self.BuildObject[PathClass(Dscfile), 'COMMON']
|
||||
if Platform == None:
|
||||
EdkLogger.error('build', PARSER_ERROR, "Failed to parser DSC file: %s" % Dscfile)
|
||||
return Platform
|
||||
|
||||
PlatformList = property(_GetPlatformList)
|
||||
|
Reference in New Issue
Block a user