finesse.script.exceptions.KatScriptError

Overview

class finesse.script.exceptions.KatScriptError(error, container, error_items, syntax=None)[source]

Bases: KatParsingError

Detailed kat script error.

Parameters
errorstr or Exception

The error or error message.

containerAddressable

The kat script container, used to show lines before/after error lines if requested.

error_itemssequence of sequences of Addressable

The error(s) to show. Each item of the topmost sequence should itself be an ordered sequence of Addressable objects in increasing order of depth. The last item is considered to be where the error occurred, but the start and end lines (plus optional buffer) of each of the other items are also shown.

syntaxstr, optional

Syntax suggestion to display to the user.

Properties

KatScriptError.error_lines

Methods

KatScriptError.__init__(error, container, ...)

KatScriptError.chunkify()

Convert the error script into a dict of line numbers to (str, is_error) sequences.

KatScriptError.items_to_linemarkers(items)

KatScriptError.message()

KatScriptError.rubric()