-
Notifications
You must be signed in to change notification settings - Fork 0
/
exceptions.py
40 lines (32 loc) · 1.07 KB
/
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
class ClientNotFoundError(Exception):
"""Raises if operation on non-existent user."""
...
class AccountNotFoundError(Exception):
""""Raises if operation on non-existent account
(e.g. `delete_account`).
"""
...
class ClientDoesNotExistError(Exception):
"""Raises if account assigned to non-existent user."""
...
class AccountDoesNotExistError(Exception):
"""Raises if operation on user with not account."""
...
class NegativeAmountError(Exception):
"""Raises if operation with `amount` < 0"""
...
class WrongAmountFormat(Exception):
"""Raises if `amount` has > 2 decimals"""
...
class AccountCreationError(Exception):
"""Raises if error is raised during account creation
(that are caused directly by account creation process,
not by, for example, assigning account to non-existent user).
"""
...
class MissingArgumentError(Exception):
"""Raises if not all arguments are passed in CLI."""
...
class ExcessArgumentsError(Exception):
"""Raises if excess arguments are passed in CLI."""
...