diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2016-04-15 16:46:48 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2016-04-19 18:32:35 +0800 |
commit | d429fcd0d25936ff5861e9c6e37f7cf9285217b2 (patch) | |
tree | 3b41158bc19855755d131ed59fd16227502574f7 /BaseTools/Source/Python/Workspace/MetaFileParser.py | |
parent | 74e8963c9b661eaa4e828b0ad2d8925e1622ac49 (diff) | |
download | edk2-d429fcd0d25936ff5861e9c6e37f7cf9285217b2.tar.gz edk2-d429fcd0d25936ff5861e9c6e37f7cf9285217b2.tar.bz2 edk2-d429fcd0d25936ff5861e9c6e37f7cf9285217b2.zip |
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>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/MetaFileParser.py')
-rw-r--r-- | BaseTools/Source/Python/Workspace/MetaFileParser.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index 3b6a3c0dfa..2811fd1ba3 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -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
|