Skip to content

Commit

Permalink
Fix exception logic
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsil committed May 8, 2024
1 parent c1de623 commit ca8aeb9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions esmerald/middleware/asyncexitstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ async def __call__(self, scope: "Scope", receive: "Receive", send: "Send") -> No
await self.app(scope, receive, send)
except Exception as e:
exception = e

if exception and self.debug:
print_exception(exception)

if exception:
raise exception

0 comments on commit ca8aeb9

Please sign in to comment.