create databaseerror classes, tbu
This commit is contained in:
10
src/errors/DatabaseErrors.py
Normal file
10
src/errors/DatabaseErrors.py
Normal file
@@ -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)
|
||||
Reference in New Issue
Block a user