Skip to content

Exceptions

liquid2.exceptions.LiquidError

Bases: Exception

Base class for all Liquid exceptions.

message property

message: object

The exception's error message if one was given.

context

context() -> tuple[int, int, str, str, str] | None

Return context information for this error.

Returns (line, col, previous line, current line, next line) or None if no context information is available.

detailed_message

detailed_message() -> str

Return an error message formatted with extra context info.

liquid2.exceptions.BreakLoop

Bases: LiquidInterrupt

Exception raised when a BreakNode is rendered.

liquid2.exceptions.ContextDepthError

Bases: ResourceLimitError

Exception raised when the maximum context depth is reached.

Usually indicates recursive use of render or include tags.

liquid2.exceptions.ContinueLoop

Bases: LiquidInterrupt

Exception raised when a ContinueNode is rendered.

liquid2.exceptions.DisabledTagError

Bases: LiquidError

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

liquid2.exceptions.LiquidEnvironmentError

Bases: LiquidError

An exception raised due to a misconfigured environment.

liquid2.exceptions.LiquidIndexError

Bases: LiquidError

An exception raised when a sequence index is out of range.

liquid2.exceptions.LiquidInterrupt

Bases: Exception

Loop interrupt exception.

liquid2.exceptions.LiquidNameError

Bases: LiquidError

An exception raised when an unknown function extension is called.

liquid2.exceptions.LiquidSyntaxError

Bases: LiquidError

Exception raised when there is a parser error.

liquid2.exceptions.LiquidTypeError

Bases: LiquidError

Exception raised when an error occurs at render time.

liquid2.exceptions.LiquidValueError

Bases: LiquidError

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

liquid2.exceptions.LocalNamespaceLimitError

Bases: ResourceLimitError

Exception raised when a local namespace limit has been exceeded.

liquid2.exceptions.LoopIterationLimitError

Bases: ResourceLimitError

Exception raised when the loop iteration limit has been exceeded.

liquid2.exceptions.OutputStreamLimitError

Bases: ResourceLimitError

Exception raised when an output stream limit has been exceeded.

liquid2.exceptions.RequiredBlockError

Bases: TemplateInheritanceError

An exception raised when a required block has not been overridden.

liquid2.exceptions.ResourceLimitError

Bases: LiquidError

Base class for exceptions relating to resource limits.

liquid2.exceptions.StopRender

Bases: Exception

Template inheritance interrupt.

An interrupt used to signal that BoundTemplate.render_with_context should stop rendering more nodes. This is used by template inheritance tags and is not an error condition.

liquid2.exceptions.TemplateInheritanceError

Bases: LiquidError

An exceptions raised when template inheritance tags are used incorrectly.

This could occur when parsing a template or at render time.

liquid2.exceptions.TemplateNotFoundError

Bases: LiquidError

Exception raised when a template could not be found.

liquid2.exceptions.TranslationError

Bases: LiquidError

Base exception for translation errors.

liquid2.exceptions.TranslationKeyError

Bases: TranslationError

Exception raised when message interpolation fails with a KeyError.

liquid2.exceptions.TranslationSyntaxError

Bases: LiquidSyntaxError

Exception raised when a syntax error is found within a translation block.

liquid2.exceptions.TranslationValueError

Bases: TranslationError

Exception raised when message interpolation fails with a ValueError.

liquid2.exceptions.UndefinedError

Bases: LiquidError

Exception raised by the StrictUndefined type.

liquid2.exceptions.UnknownFilterError

Bases: LiquidError

Exception raised when a filter lookup fails.