diff --git a/nonebot/message.py b/nonebot/message.py
index 90af9a96..ffd26b81 100644
--- a/nonebot/message.py
+++ b/nonebot/message.py
@@ -149,6 +149,8 @@ async def _run_matcher(Matcher: Type[Matcher], bot: Bot, event: Event,
try:
logger.debug(f"Running matcher {matcher}")
await matcher.run(bot, event, state)
+ except StopPropagation as e:
+ exception = e
except Exception as e:
logger.opt(colors=True, exception=e).error(
f"Running matcher {matcher} failed."
@@ -166,7 +168,7 @@ async def _run_matcher(Matcher: Type[Matcher], bot: Bot, event: Event,
"Error when running RunPostProcessors"
)
- if matcher.block:
+ if matcher.block or isinstance(exception, StopPropagation):
raise StopPropagation