summaryrefslogtreecommitdiff
path: root/jimbrella/exceptions.py
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2021-10-22 10:28:01 +0800
committerFrederick Yin <fkfd@fkfd.me>2021-10-22 10:28:01 +0800
commita3d400705e53b131997dc5e9c6ac10f2b5502761 (patch)
treeeb072599b76c947024f1218b88f3366782a79087 /jimbrella/exceptions.py
parent2697f216b707ae83bcdaa5688fdb91d1f662d61d (diff)
Define application-specific exceptions
Diffstat (limited to 'jimbrella/exceptions.py')
-rw-r--r--jimbrella/exceptions.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/jimbrella/exceptions.py b/jimbrella/exceptions.py
new file mode 100644
index 0000000..3b7fa4c
--- /dev/null
+++ b/jimbrella/exceptions.py
@@ -0,0 +1,11 @@
+"""Defines a few application-specific exceptions for Pythonic code."""
+class UmbrellaNotFoundError(Exception):
+ """For when an umbrella with required serial is not found in database."""
+ pass
+
+
+class UmbrellaStatusError(Exception):
+ """For when the umbrella to be lent is not available, or when an umbrella to be returned has
+ never been taken away. Most likely duplicate or erroneous answer sheets submitted by user.
+ """
+ pass