BaseTools:Add extra debugging message
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2014 Add extra debugging to improve error identification. Error while processing file if the file is read incorrectly This patch is going to fix that issue. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -526,12 +526,16 @@ def SearchString(UniObjectClass, FileList, IsCompatibleMode):
|
||||
return UniObjectClass
|
||||
|
||||
for File in FileList:
|
||||
if os.path.isfile(File):
|
||||
Lines = open(File, 'r')
|
||||
for Line in Lines:
|
||||
for StrName in STRING_TOKEN.findall(Line):
|
||||
EdkLogger.debug(EdkLogger.DEBUG_5, "Found string identifier: " + StrName)
|
||||
UniObjectClass.SetStringReferenced(StrName)
|
||||
try:
|
||||
if os.path.isfile(File):
|
||||
Lines = open(File, 'r')
|
||||
for Line in Lines:
|
||||
for StrName in STRING_TOKEN.findall(Line):
|
||||
EdkLogger.debug(EdkLogger.DEBUG_5, "Found string identifier: " + StrName)
|
||||
UniObjectClass.SetStringReferenced(StrName)
|
||||
except:
|
||||
EdkLogger.error("UnicodeStringGather", AUTOGEN_ERROR, "SearchString: Error while processing file", File=File, RaiseError=False)
|
||||
raise
|
||||
|
||||
UniObjectClass.ReToken()
|
||||
|
||||
|
Reference in New Issue
Block a user