This commit is contained in:
yumoqing 2024-11-11 10:18:08 +08:00
parent ce6f3df30e
commit 3bedc70ded
2 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,6 @@
import asyncio import asyncio
from traceback import print_exc from traceback import format_exc
from functools import wraps from functools import wraps
import codecs import codecs
@ -209,7 +209,8 @@ class DBPools:
try: try:
yield sqlor yield sqlor
except Exception as e: except Exception as e:
exception(f'sqlorContext():EXCEPTION{e}') cb = format_exc()
exception(f'sqlorContext():EXCEPTION{e}, {cb}')
if sqlor and sqlor.dataChanged: if sqlor and sqlor.dataChanged:
await sqlor.rollback() await sqlor.rollback()
finally: finally:

View File

@ -1,6 +1,6 @@
import asyncio import asyncio
from traceback import print_exc from traceback import format_exc
from functools import wraps from functools import wraps
import codecs import codecs
@ -209,7 +209,8 @@ class DBPools:
try: try:
yield sqlor yield sqlor
except Exception as e: except Exception as e:
exception(f'sqlorContext():EXCEPTION{e}') cb = format_exc()
exception(f'sqlorContext():EXCEPTION{e}, {cb}')
if sqlor and sqlor.dataChanged: if sqlor and sqlor.dataChanged:
await sqlor.rollback() await sqlor.rollback()
finally: finally: