mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
Merge branch 'bugfix/parseexception_msg' into 'master'
ldgen: change exception message access See merge request espressif/esp-idf!9121
This commit is contained in:
@@ -107,7 +107,7 @@ class FragmentFile():
|
|||||||
try:
|
try:
|
||||||
parse_ctx.fragment.set_key_value(parse_ctx.key, stmts)
|
parse_ctx.fragment.set_key_value(parse_ctx.key, stmts)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise ParseFatalException(pstr, loc, "unable to add key '%s'; %s" % (parse_ctx.key, e.message))
|
raise ParseFatalException(pstr, loc, "unable to add key '%s'; %s" % (parse_ctx.key, str(e)))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
key = Word(alphanums + "_") + Suppress(":")
|
key = Word(alphanums + "_") + Suppress(":")
|
||||||
@@ -139,7 +139,7 @@ class FragmentFile():
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
raise ParseFatalException(pstr, loc, "key '%s' is not supported by fragment" % key)
|
raise ParseFatalException(pstr, loc, "key '%s' is not supported by fragment" % key)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise ParseFatalException(pstr, loc, "unable to parse key '%s'; %s" % (key, e.message))
|
raise ParseFatalException(pstr, loc, "unable to parse key '%s'; %s" % (key, str(e)))
|
||||||
|
|
||||||
key_stmt << (conditional | Group(key_grammar).setResultsName("value"))
|
key_stmt << (conditional | Group(key_grammar).setResultsName("value"))
|
||||||
|
|
||||||
|
@@ -591,7 +591,7 @@ class SectionsInfo(dict):
|
|||||||
try:
|
try:
|
||||||
results = parser.parseString(first_line)
|
results = parser.parseString(first_line)
|
||||||
except ParseException as p:
|
except ParseException as p:
|
||||||
raise ParseException("Parsing sections info for library " + sections_info_dump.name + " failed. " + p.message)
|
raise ParseException("Parsing sections info for library " + sections_info_dump.name + " failed. " + p.msg)
|
||||||
|
|
||||||
archive = os.path.basename(results.archive_path)
|
archive = os.path.basename(results.archive_path)
|
||||||
self.sections[archive] = SectionsInfo.__info(sections_info_dump.name, sections_info_dump.read())
|
self.sections[archive] = SectionsInfo.__info(sections_info_dump.name, sections_info_dump.read())
|
||||||
@@ -618,7 +618,7 @@ class SectionsInfo(dict):
|
|||||||
try:
|
try:
|
||||||
results = parser.parseString(sections_info_text)
|
results = parser.parseString(sections_info_text)
|
||||||
except ParseException as p:
|
except ParseException as p:
|
||||||
raise ParseException("Unable to parse section info file " + info.filename + ". " + p.message)
|
raise ParseException("Unable to parse section info file " + info.filename + ". " + p.msg)
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user