def METHOD_NAME(loop: asyncio.AbstractEventLoop, context: dict[str, Any]) -> None:
    nonlocal exceptions
    # first, handle with default handler
    loop.default_exception_handler(context)
    exception = context.get("exception")
    if exception:
        exceptions.append(repr(exception))
        loop.stop()