Feature: 在加载 drivers 引发 ImportError 时,使用 raise from e
而不是 raise from None
#1688
Labels
enhancement
New feature or request
raise from e
而不是 raise from None
#1688
是否在使用中遇到某些问题而需要新的特性?请描述:
昨天在nb qq群里帮一个人 debug fastapi 加载失败,最后发现是系统 python 有问题,无法加载 _ssl 模块
如果使用
raise from e
一开始就可以知道是无法加载 _ssl 模块描述你所需要的特性:
在加载 drivers 引发 ImportError 时,使用
raise from e
而不是raise from None
nonebot2/nonebot/drivers/fastapi.py
Lines 35 to 43 in 6d7435b
The text was updated successfully, but these errors were encountered: