From 3bedc70ded6eb631d1618863c3d741411bb17830 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 11 Nov 2024 10:18:08 +0800 Subject: [PATCH] bugfix --- build/lib/sqlor/dbpools.py | 5 +++-- sqlor/dbpools.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build/lib/sqlor/dbpools.py b/build/lib/sqlor/dbpools.py index 9a5ac02..44fa5bc 100644 --- a/build/lib/sqlor/dbpools.py +++ b/build/lib/sqlor/dbpools.py @@ -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: diff --git a/sqlor/dbpools.py b/sqlor/dbpools.py index 9a5ac02..44fa5bc 100755 --- a/sqlor/dbpools.py +++ b/sqlor/dbpools.py @@ -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: