This commit is contained in:
yumoqing 2025-04-15 17:45:43 +08:00
parent 5ed59e19a4
commit 0570bf8952

View File

@ -205,10 +205,12 @@ class DBPools:
@asynccontextmanager @asynccontextmanager
async def sqlorContext(self,name): async def sqlorContext(self,name):
self.e_except = None
sqlor = await self.getSqlor(name) sqlor = await self.getSqlor(name)
try: try:
yield sqlor yield sqlor
except Exception as e: except Exception as e:
self.e_except = e
cb = format_exc() cb = format_exc()
exception(f'sqlorContext():EXCEPTION{e}, {cb}') exception(f'sqlorContext():EXCEPTION{e}, {cb}')
if sqlor and sqlor.dataChanged: if sqlor and sqlor.dataChanged: