forked from sh-edraft.de/sh_discord_bot
Added error handling to DBContext
This commit is contained in:
parent
4bcab95369
commit
a3512b56d7
@ -30,4 +30,8 @@ class DBContext(DatabaseContext):
|
||||
self._logger.error(__name__, "Saving changes failed", e)
|
||||
|
||||
def select(self, statement: str) -> list[tuple]:
|
||||
return super(DBContext, self).select(statement)
|
||||
try:
|
||||
return super(DBContext, self).select(statement)
|
||||
except Exception as e:
|
||||
self._logger.error(__name__, f'Database error caused by {statement}', e)
|
||||
return []
|
||||
|
Loading…
Reference in New Issue
Block a user