From 51b55ef830084b59b2f2471cbf9d5e651af7aa7f Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 23 Jun 2022 16:43:52 +0800 Subject: [PATCH] bugfix --- ahserver/processorResource.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ahserver/processorResource.py b/ahserver/processorResource.py index 04d0c06..7274981 100644 --- a/ahserver/processorResource.py +++ b/ahserver/processorResource.py @@ -134,9 +134,12 @@ class ProcessorResource(AppLogger, StaticResource,Url2File): with t: try: x = await self._handle1(request) - except: - return None + except Exception as e: + self.error(f'{name}:error={e}') + x = e self.info(f'{name}:time cost={t.end_time - t.begin_time}') + if x is None: + return HTTPException() return x async def _handle1(self,request:Request) -> StreamResponse: