WIP: Refactor Aurora (3.0.0) #29
1 changed files with 6 additions and 1 deletions
|
@ -289,7 +289,12 @@ class Moderation(AuroraGuildModel):
|
||||||
else:
|
else:
|
||||||
no_cursor = False
|
no_cursor = False
|
||||||
|
|
||||||
|
try:
|
||||||
await cursor.execute(query, parameters)
|
await cursor.execute(query, parameters)
|
||||||
|
except OperationalError as e:
|
||||||
|
logger.error("Error executing query: \"%s\" with parameters \"%s\"\nError:\n%s",
|
||||||
|
query, parameters, e)
|
||||||
|
raise OperationalError(f"Error executing query: \"{query}\" with parameters \"{parameters}\"") from e
|
||||||
results = await cursor.fetchall()
|
results = await cursor.fetchall()
|
||||||
await database.commit()
|
await database.commit()
|
||||||
if no_cursor:
|
if no_cursor:
|
||||||
|
|
Loading…
Reference in a new issue