You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
code like this:
db = ...
with db.transaction() as tx:
tx.query(...) # raise an sql error
but the error raised by tx.query disappears.
I found the code:
def transaction(self):
"""A context manager for executing a transaction on this Database."""
conn = self.get_connection()
tx = conn.transaction()
try:
yield conn
tx.commit()
except:
tx.rollback()
raise # This may be the solution
finally:
conn.close()
The text was updated successfully, but these errors were encountered:
code like this:
db = ...
with db.transaction() as tx:
tx.query(...) # raise an sql error
but the error raised by tx.query disappears.
I found the code:
def transaction(self):
"""A context manager for executing a transaction on this Database."""
The text was updated successfully, but these errors were encountered: