{ref}`nonebot.rule.shell_command` 处理消息失败时返回的异常。
| 45 | |
| 46 | # Rule Exception |
| 47 | class 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 |