mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-17 03:20:54 +00:00
🐛 fix matcher.skip missing
This commit is contained in:
@ -126,12 +126,20 @@ class SkippedException(MatcherException):
|
||||
可以在 ``Handler`` 中通过 ``Matcher.skip()`` 抛出。
|
||||
"""
|
||||
|
||||
|
||||
class TypeMisMatch(SkippedException):
|
||||
"""
|
||||
:说明:
|
||||
|
||||
当前 ``Handler`` 的参数类型不匹配。
|
||||
"""
|
||||
|
||||
def __init__(self, param: ModelField, value: Any):
|
||||
self.param: ModelField = param
|
||||
self.value: Any = value
|
||||
|
||||
def __repr__(self):
|
||||
return f"<SkippedException, param={self.param}, value={self.value}>"
|
||||
return f"<TypeMisMatch, param={self.param}, value={self.value}>"
|
||||
|
||||
def __str__(self):
|
||||
self.__repr__()
|
||||
|
Reference in New Issue
Block a user