MCPcopy
hub / github.com/nonebot/nonebot2 / ParserExit

Class ParserExit

nonebot/exception.py:47–59  ·  view source on GitHub ↗

{ref}`nonebot.rule.shell_command` 处理消息失败时返回的异常。

Source from the content-addressed store, hash-verified

45
46# Rule Exception
47class ParserExit(NoneBotException):
48 """{ref}`nonebot.rule.shell_command` 处理消息失败时返回的异常。"""
49
50 def __init__(self, status: int = 0, message: str | None = None) -> None:
51 self.status = status
52 self.message = message
53
54 def __repr__(self) -> str:
55 return (
56 f"ParserExit(status={self.status}"
57 + (f", message={self.message!r}" if self.message else "")
58 + ")"
59 )
60
61
62# Processor Exception

Callers 2

exitMethod · 0.90
__call__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected