ldgen: change other accesses of exception message

Closes https://github.com/espressif/esp-idf/pull/5336
This commit is contained in:
Renz Bagaporo 2020-06-10 13:53:51 +08:00
parent 177c3d0f5a
commit ea07ce1a5a
2 changed files with 3 additions and 3 deletions

View file

@ -107,7 +107,7 @@ class FragmentFile():
try:
parse_ctx.fragment.set_key_value(parse_ctx.key, stmts)
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
key = Word(alphanums + "_") + Suppress(":")
@ -139,7 +139,7 @@ class FragmentFile():
except KeyError:
raise ParseFatalException(pstr, loc, "key '%s' is not supported by fragment" % key)
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"))

View file

@ -618,7 +618,7 @@ class SectionsInfo(dict):
try:
results = parser.parseString(sections_info_text)
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