File size: 304 Bytes
1f725d8
5551822
1f725d8
 
 
 
 
 
 
5551822
 
1f725d8
1
2
3
4
5
6
7
8
9
10
11
12
13
from functools import wraps
import logging

def asyncHandler(fn):
    @wraps(fn)
    async def decorator(*args, **kwargs):
        try:
            return await fn(*args, **kwargs)
        except Exception as e:
            logging.exception("Unhandled exception")
            raise
    return decorator