* [Patch] BaseTool: Enhance error message.
@ 2018-03-05 8:54 BobCF
0 siblings, 0 replies; only message in thread
From: BobCF @ 2018-03-05 8:54 UTC (permalink / raw)
To: edk2-devel; +Cc: Bob Feng, Liming Gao
Enhance the error message when the PCD from
commandline can not be found.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
---
BaseTools/Source/Python/Workspace/DscBuildData.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index 7b5c7ebc34..9838acb4ed 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -1103,14 +1103,15 @@ class DscBuildData(PlatformBuildClassObject):
AUTOGEN_ERROR,
"The Pcd %s is found under multiple different TokenSpaceGuid: %s and %s." % (TokenCName, PcdItem.TokenSpaceGuidCName, TokenSpaceGuidCNameList[0])
)
GlobalData.BuildOptionPcd[i] = (TokenSpaceGuidCName, TokenCName, FieldName,NewValue,("build command options",1))
if not FoundFlag:
- if HasTokenSpace:
- EdkLogger.error('build', AUTOGEN_ERROR, "The Pcd %s.%s is not found in the DEC file." % (TokenSpaceGuidCName, TokenCName))
+ if pcdname.count(".") > 1:
+ pcdnamefield = pcdname.split(".")
+ EdkLogger.error('build', AUTOGEN_ERROR, "The Pcd %s.%s is not found in the DEC file." % (pcdnamefield[0],pcdnamefield[1]))
else:
- EdkLogger.error('build', AUTOGEN_ERROR, "The Pcd %s is not found in the DEC file." % (TokenCName))
+ EdkLogger.error('build', AUTOGEN_ERROR, "The Pcd %s is not found in the DEC file." % (pcdname))
for BuildData in self._Bdb._CACHE_.values():
if BuildData.MetaFile.Ext == '.dec' or BuildData.MetaFile.Ext == '.dsc':
continue
for key in BuildData.Pcds:
PcdItem = BuildData.Pcds[key]
--
2.14.3.windows.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-05 8:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-05 8:54 [Patch] BaseTool: Enhance error message BobCF
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox