-
Notifications
You must be signed in to change notification settings - Fork 0
/
exceptions.py
43 lines (30 loc) · 919 Bytes
/
exceptions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from textLogging import log_write
class CustomException(Exception):
def __init__(self, message):
super().__init__(message)
self.log_exception()
def log_exception(self):
log_write(f"EXCEPTION: {str(self)}")
class UnauthorizedAccessError(CustomException):
pass
class TransactionNotFoundError(CustomException):
pass
class EnvelopeNotFoundError(CustomException):
pass
class AccountNotFoundError(CustomException):
pass
class UserNotFoundError(CustomException):
pass
class UserIdCookieNotFoundError(CustomException):
def __init__(self):
super().__init__("User ID cookie not found")
class InvalidFormDataError(CustomException):
pass
class TimestampParseError(CustomException):
pass
class InvalidFileSizeError(CustomException):
pass
class InvalidFileTypeError(CustomException):
pass
class OtherError(CustomException):
pass