mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 20:09:11 +00:00
More informative syntax error reporting.
This commit is contained in:
parent
f6ecc25a4b
commit
f7941bbc25
@ -67,7 +67,14 @@ def main():
|
||||
except WAError, e:
|
||||
logging.critical(e)
|
||||
sys.exit(1)
|
||||
except Exception, e: # pylint: disable=broad-except
|
||||
except SyntaxError as e:
|
||||
message = 'Syntax Error in {}, line {}, offset {}:'
|
||||
logging.critical(message.format(e.filename, e.lineno, e.offset))
|
||||
logging.critical('\t{}'.format(e.msg))
|
||||
tb = get_traceback()
|
||||
logging.critical(tb)
|
||||
sys.exit(2)
|
||||
except Exception as e: # pylint: disable=broad-except
|
||||
tb = get_traceback()
|
||||
logging.critical(tb)
|
||||
logging.critical('{}({})'.format(e.__class__.__name__, e))
|
||||
|
Loading…
x
Reference in New Issue
Block a user