From 244bd0bb25fe769d0a1e89eac255dbb7d779dad2 Mon Sep 17 00:00:00 2001 From: WorldTeacher <41587052+WorldTeacher@users.noreply.github.com> Date: Wed, 7 Feb 2024 11:37:19 +0100 Subject: [PATCH] create databaseerror classes, tbu --- src/errors/DatabaseErrors.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/errors/DatabaseErrors.py diff --git a/src/errors/DatabaseErrors.py b/src/errors/DatabaseErrors.py new file mode 100644 index 0000000..ff332ac --- /dev/null +++ b/src/errors/DatabaseErrors.py @@ -0,0 +1,10 @@ + +class NoResultError(Exception): + def __init__(self,message): + self.message = f"The query: {message} returned no results" + super().__init__(self.message) + +class AppPresentError(Exception): + def __init__(self, message): + self.message = f"The app {message} is already present in the database" + super().__init__(self.message) \ No newline at end of file