Skip to content
class

IndexError

extendsLucidError
IndexError

Thrown by indexing and slicing operations when an index falls outside the valid range of its dimension.

Mapped to lucid._C.engine.IndexError on the Python side, which inherits from both LucidError and the built-in IndexError — so except IndexError and except LucidError both catch it.

Parameters

msgstd::string
Fully formatted message; passed through unchanged to the LucidError base.

Constructors

1
ctor

IndexError

void IndexError(int msg)

Construct an IndexError from the pre-formatted message the call site built describing the offending index vs the valid range. Passed through unchanged to the LucidError base.