From a3d400705e53b131997dc5e9c6ac10f2b5502761 Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Fri, 22 Oct 2021 10:28:01 +0800 Subject: Define application-specific exceptions --- jimbrella/exceptions.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 jimbrella/exceptions.py (limited to 'jimbrella/exceptions.py') 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 -- cgit v1.2.3