Merge branch 'master' of git.kaiyuancloud.cn:yumoqing/sqlor

This commit is contained in:
yumoqing 2025-05-24 13:32:23 +08:00
commit ff670d7bd0

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: