diff options
author | Yunhua Feng <yunhuax.feng@intel.com> | 2018-06-17 17:22:21 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-06-22 13:38:40 +0800 |
commit | 09ef8e92580caddc24f8f1db6ea0e8223890085f (patch) | |
tree | 98649a1da3637d25ba4ebb941b1d92b7388e8b54 /BaseTools/Source/Python/Common | |
parent | 58cf30f71f03bcf2fbf369d51e05c8f17176e129 (diff) | |
download | edk2-09ef8e92580caddc24f8f1db6ea0e8223890085f.tar.gz edk2-09ef8e92580caddc24f8f1db6ea0e8223890085f.tar.bz2 edk2-09ef8e92580caddc24f8f1db6ea0e8223890085f.zip |
BaseTools: introduce !error statement
The DSC and FDF file can use `!error` statement. The argument of this
statement is an error message, it causes build tool to stop at the
location where the statement is encountered and error message following
the `!error` statement is output as a message.
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=701
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Common')
-rw-r--r-- | BaseTools/Source/Python/Common/BuildToolError.py | 2 | ||||
-rw-r--r-- | BaseTools/Source/Python/Common/DataType.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Common/BuildToolError.py b/BaseTools/Source/Python/Common/BuildToolError.py index 27779c5d98..fc2503ea80 100644 --- a/BaseTools/Source/Python/Common/BuildToolError.py +++ b/BaseTools/Source/Python/Common/BuildToolError.py @@ -89,6 +89,7 @@ PCD_VARIABLE_INFO_ERROR = 0xF016 PCD_VARIABLE_ATTRIBUTES_CONFLICT_ERROR = 0xF013
PCD_STRUCTURE_PCD_INVALID_FIELD_ERROR = 0xF014
PCD_STRUCTURE_PCD_ERROR = 0xF015
+ERROR_STATEMENT = 0xFFFD
ABORT_ERROR = 0xFFFE
UNKNOWN_ERROR = 0xFFFF
@@ -151,6 +152,7 @@ gErrorMessage = { IO_TIMEOUT : "Timeout",
IO_UNKNOWN_ERROR : "Unknown error in IO operation",
+ ERROR_STATEMENT : "!error statement",
UNKNOWN_ERROR : "Unknown error",
}
diff --git a/BaseTools/Source/Python/Common/DataType.py b/BaseTools/Source/Python/Common/DataType.py index a72c7e6f06..154245ca31 100644 --- a/BaseTools/Source/Python/Common/DataType.py +++ b/BaseTools/Source/Python/Common/DataType.py @@ -471,7 +471,7 @@ TAB_ELSE = '!else' TAB_IF_DEF = '!ifdef'
TAB_IF_N_DEF = '!ifndef'
TAB_IF_EXIST = '!if exist'
-TAB_ERROR = '!ERROR'
+TAB_ERROR = '!error'
#
# Unknown section
|