Skip to content

Recursion error

Classes:

Name Description
GraphRecursionError

Exception raised when graph execution exceeds the recursion limit.

Attributes:

Name Type Description
logger

Attributes

logger module-attribute

logger = getLogger(__name__)

Classes

GraphRecursionError

Bases: GraphError

Exception raised when graph execution exceeds the recursion limit.

This exception is used to indicate that a graph operation has recursed too deeply.

Example

from pyagenity.exceptions.recursion_error import GraphRecursionError raise GraphRecursionError("Recursion limit exceeded in graph execution")

Methods:

Name Description
__init__

Initializes a GraphRecursionError with the given message.

Source code in pyagenity/exceptions/recursion_error.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
class GraphRecursionError(GraphError):
    """
    Exception raised when graph execution exceeds the recursion limit.

    This exception is used to indicate that a graph operation has recursed too deeply.

    Example:
        >>> from pyagenity.exceptions.recursion_error import GraphRecursionError
        >>> raise GraphRecursionError("Recursion limit exceeded in graph execution")
    """

    def __init__(self, message: str):
        """
        Initializes a GraphRecursionError with the given message.

        Args:
            message (str): Description of the recursion error.
        """
        logger.error("GraphRecursionError raised: %s", message)
        super().__init__(message)

Functions

__init__
__init__(message)

Initializes a GraphRecursionError with the given message.

Parameters:

Name Type Description Default
message
str

Description of the recursion error.

required
Source code in pyagenity/exceptions/recursion_error.py
20
21
22
23
24
25
26
27
28
def __init__(self, message: str):
    """
    Initializes a GraphRecursionError with the given message.

    Args:
        message (str): Description of the recursion error.
    """
    logger.error("GraphRecursionError raised: %s", message)
    super().__init__(message)