Commit 39e9075f authored by Dylan Baker's avatar Dylan Baker

framework/exceptions: Add an exception class for user errors

It's nice to separate "something internally went wrong" and "you
mis-configured or passed bad flags".
Signed-off-by: default avatarDylan Baker <>
parent e483f379
......@@ -56,6 +56,9 @@ def handler(func):
print('Aborting Piglit execution: {}'.format(str(e)),
except PiglitUserError as e:
print('User error: {}'.format(str(e)), file=sys.stderr)
return _inner
......@@ -94,6 +97,14 @@ class PiglitFatalError(Exception):
class PiglitUserError(Exception):
"""Class for user configuration errors.
When this class (or a subclass) is raised it should be raised all the way
to the top of the program where it exits.
class PiglitAbort(Exception):
"""Class for non-errors that require piglit aborting.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment