Skip to content

Exceptions

Error

Error(
    *args: object,
    linenum: Optional[int] = None,
    filename: Optional[Union[str, Path]] = None
)

Bases: Exception

Base class for all Liquid exceptions.

message property

message: object

The exception's error message if one was given.

name property

name: str

The name of the template that raised this exception.

An empty string is return if a name is not available.

LiquidSyntaxError

LiquidSyntaxError(
    *args: object,
    linenum: Optional[int] = None,
    filename: Optional[Union[str, Path]] = None
)

Bases: Error

Exception raised when there is a parser error.

LiquidTypeError

Bases: Error

Exception raised when an error occurs at render time.

LiquidValueError

Bases: LiquidSyntaxError

Exception raised when a cast from str to int exceeds the length limit.

DisabledTagError

Bases: Error

Exception raised when an attempt is made to render a disabled tag.

NoSuchFilterFunc

Bases: Error

Exception raised when a filter lookup fails.

FilterArgumentError

Bases: Error

Exception raised when a filter's arguments are invalid.

FilterValueError

Bases: Error

Exception raised when a filters value is invalid.

TemplateNotFound

Bases: Error

Exception raised when a template could not be found.

TemplateTraversalError

Bases: Error

Exception raised when an AST node or expression can not be visited.

ContextDepthError

Bases: ResourceLimitError

Exception raised when the maximum context depth is reached.

Usually indicates recursive use of render or include tags.

LocalNamespaceLimitError

Bases: ResourceLimitError

Exception raised when a local namespace limit has been exceeded.

LoopIterationLimitError

Bases: ResourceLimitError

Exception raised when the loop iteration limit has been exceeded.

OutputStreamLimitError

Bases: ResourceLimitError

Exception raised when an output stream limit has been exceeded.

UndefinedError

Bases: Error

Exception raised by the StrictUndefined type.