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

View File

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