1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-08 14:22:35 +01:00

json: Replaced json results processor with a more comprehensive one

This commit is contained in:
Sebastian Goscik
2016-01-28 11:00:17 +00:00
parent de133cddb4
commit cd0186d14e
6 changed files with 413 additions and 27 deletions

View File

@@ -141,3 +141,20 @@ class WorkerThreadError(WAError):
message = 'Exception of type {} occured on thread {}:\n'.format(orig_name, thread)
message += '{}\n{}: {}'.format(get_traceback(self.exc_info), orig_name, orig)
super(WorkerThreadError, self).__init__(message)
class SerializerSyntaxError(Exception):
"""
Error loading a serialized structure from/to a file handle.
"""
def __init__(self, message, line=None, column=None):
super(SerializerSyntaxError, self).__init__(message)
self.line = line
self.column = column
def __str__(self):
linestring = ' on line {}'.format(self.line) if self.line else ''
colstring = ' in column {}'.format(self.column) if self.column else ''
message = 'Syntax Error{}: {}'
return message.format(''.join([linestring, colstring]), self.message)