Errors#
The exception types the framework raises. All inherit from a single base, so you
can catch every framework error with one except clause or narrow to a
specific failure.
For when each one is raised and how to handle it, see the Errors guide.
- exception bootstack.errors.DuplicateIdError#
Bases:
BootstackErrorRaised when a data source receives a record whose id already exists.
Record ids must be unique — they identify rows for selection and events.
- exception bootstack.errors.InvalidChoiceError#
Bases:
BootstackError,ValueErrorRaised when a keyword argument is given a value outside its valid set.
Applies to arguments that name a behavior mode drawn from a closed set, such as
selection_modeorscrollbars. The message names the value that was rejected and lists the values that are accepted.Also a
ValueError, so eitherBootstackErrororValueErrorcatches it.
Bases:
BootstackErrorRaised when a navigation operation references a wrong key.
Examples: adding a page, tab, or workspace whose key already exists, or selecting, looking up, or removing one whose key does not exist.
- exception bootstack.errors.ParentResolutionError#
Bases:
BootstackErrorRaised when a widget cannot resolve its parent.
- exception bootstack.errors.SerializationError#
Bases:
BootstackErrorRaised when a file-backed store or data source receives a value it cannot persist.
File- and database-backed sources carry non-scalar fields as JSON, and
Storepersists its values as JSON, so values must be JSON-serializable (scalars, lists, dicts). Store arbitrary Python objects in an in-memory source instead.
- exception bootstack.errors.StyleBuilderError#
Bases:
BootstackErrorRaised when a widget style cannot be built.
Examples: an unsupported
variantfor a widget, or a missing required theme color token.
- exception bootstack.errors.ThemeError#
Bases:
BootstackErrorRaised when a theme-related operation fails.
Examples: requesting an unknown theme name, or loading a malformed theme definition.
- exception bootstack.errors.UnknownEventError#
Bases:
BootstackErrorRaised by
widget.on(name, ...)whennamecannot be resolved.