跳过内容

pydantic_graph.exceptions

图形设置错误

基类: TypeError

由于图形配置不正确而导致的错误。

Source code in pydantic_graph/pydantic_graph/exceptions.py
1
2
3
4
5
6
7
8
9
class GraphSetupError(TypeError):
    """Error caused by an incorrectly configured graph."""

    message: str
    """Description of the mistake."""

    def __init__(self, message: str):
        self.message = message
        super().__init__(message)

消息 instance-attribute

message: str = message

错误的描述。

图形运行时错误

基类: RuntimeError

图形执行期间出现问题导致的错误。

Source code in pydantic_graph/pydantic_graph/exceptions.py
12
13
14
15
16
17
18
19
20
class GraphRuntimeError(RuntimeError):
    """Error caused by an issue during graph execution."""

    message: str
    """The error message."""

    def __init__(self, message: str):
        self.message = message
        super().__init__(message)

消息 instance-attribute

message: str = message

错误消息。