summaryrefslogtreecommitdiff
path: root/jimbrella/exceptions.py
blob: 2c62bc4b6a914fde7bec5845fd46978e70eee423 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""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


class UmbrellaValueError(Exception):
    """For when an admin enters an invalid value when modifying the database."""

    pass