MCPcopy
hub / github.com/nonebot/nonebot2 / _handle_exception

Function _handle_exception

nonebot/message.py:145–150  ·  view source on GitHub ↗
(msg: str)

Source from the content-addressed store, hash-verified

143
144
145def _handle_exception(msg: str) -> Callable[[BaseExceptionGroup[Exception]], None]:
146 def _handle(exc_group: BaseExceptionGroup[Exception]) -> None:
147 for exc in flatten_exception_group(exc_group):
148 logger.opt(colors=True, exception=exc).error(msg)
149
150 return _handle
151
152
153async def _apply_event_preprocessors(

Callers 5

_apply_run_preprocessorsFunction · 0.85
handle_eventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected