🐛 add skip handle for process

This commit is contained in:
yanyongyu
2021-12-06 00:17:52 +08:00
parent c25ee1cb56
commit ca4d7397f8
4 changed files with 76 additions and 32 deletions

View File

@ -8,6 +8,8 @@
from typing import Any, Optional
from pydantic.fields import ModelField
class NoneBotException(Exception):
"""
@ -124,6 +126,16 @@ class SkippedException(MatcherException):
可以在 ``Handler`` 中通过 ``Matcher.skip()`` 抛出。
"""
def __init__(self, param: ModelField, value: Any):
self.param = param
self.value = value
def __repr__(self):
return f"<SkippedException, param={self.param}, value={self.value}>"
def __str__(self):
self.__repr__()
class PausedException(MatcherException):
"""