mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-06 20:16:47 +00:00
✨ Use raise from e
when load driver error (#1689)
This commit is contained in:
@ -37,10 +37,10 @@ try:
|
||||
from fastapi.responses import Response
|
||||
from fastapi import FastAPI, Request, UploadFile, status
|
||||
from starlette.websockets import WebSocket, WebSocketState, WebSocketDisconnect
|
||||
except ImportError: # pragma: no cover
|
||||
except ImportError as e: # pragma: no cover
|
||||
raise ImportError(
|
||||
"Please install FastAPI by using `pip install nonebot2[fastapi]`"
|
||||
) from None
|
||||
) from e
|
||||
|
||||
|
||||
def catch_closed(func):
|
||||
|
Reference in New Issue
Block a user