From 9c4902dcfe2d016b71435ff4be348ea76a1cd7cf Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 18 Nov 2019 12:06:59 +0000 Subject: "EventsResultsError"->"EventResultsError", move errors to utils.error --- src/utils/errors.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/utils/errors.py (limited to 'src/utils/errors.py') diff --git a/src/utils/errors.py b/src/utils/errors.py new file mode 100644 index 00000000..7b7720c6 --- /dev/null +++ b/src/utils/errors.py @@ -0,0 +1,12 @@ +class EventError(Exception): + pass +class EventResultsError(EventError): + def __init__(self): + EventError.__init__(self, "Failed to load results") +class EventNotEnoughArgsError(EventError): + def __init__(self, n): + EventError.__init__(self, "Not enough arguments (minimum %d)" % n) +class EventUsageError(EventError): + def __init__(self, usage): + EventError.__init__(self, "Not enough arguments, usage: %s" % usage) + -- cgit v1.3.1-10-gc9f91