ARM-software / trappy

This repository has moved to https://gitlab.arm.com/tooling/trappy
Apache License 2.0
60 stars 39 forks source link

stats/grammar: Raise meaningful error when asked to parse bad event #235

Closed bjackman closed 7 years ago

bjackman commented 7 years ago

If you typo a trace event name in a call to Parser.solve, you currently get a KeyError from trying to access the result of globals(); the stacktrace goes through a pyparsing callback to str_to_attr via _pre_process ("""Pre-process accessors for super-indexing""")...

Add an exception with a message to hint at what went wrong.

bjackman commented 7 years ago

Copyright test fails due to 2017 (the MMXVIIium bug is here), checks should pass once https://github.com/ARM-software/trappy/pull/234 is merged.

bjackman commented 7 years ago

Rebased now that https://github.com/ARM-software/trappy/pull/234 is merged