lscl.errors – Error definitions

exception lscl.errors.Error(message: str | None = None, /)

Bases: ValueError

An error has occurred in an lscl function.

Parameters:

message (str | None)

Return type:

None

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception lscl.errors.DecodeError(message: str | None, /, *, line: int, column: int, offset: int)

Bases: Error

An error has occurred while decoding something.

Parameters:
Return type:

None

line: int

Line number, counting from 1.

column: int

Column number, counting from 1.

offset: int

Offset of the string.

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception lscl.errors.StringRenderingError(*, string: str)

Bases: Error

An error has occurred while rendering a string.

Parameters:

string (str)

Return type:

None

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

string: str

String that could not be rendered.

exception lscl.errors.SelectorElementRenderingError(*, selector_element: str)

Bases: Error

An error has occurred while rendering a selector element.

Parameters:

selector_element (str)

Return type:

None

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

selector_element: str

Selector element that could not be rendered.