Skip to main content

Module errors

Module errors 

Source
Expand description

Error types.

Port of the exceptions in upstream rich/errors.py. Upstream’s classes form a small hierarchy (ConsoleError and StyleError at the root); here each class is a RichError variant, and RichError::is_console_error and RichError::is_style_error answer upstream’s isinstance checks. As more of the library is ported, additional variants are added here rather than scattering ad-hoc error types across modules.

Enums§

RichError
Errors produced while parsing colors, styles, or markup.

Type Aliases§

Result
Convenience alias mirroring the subset of rich that raises on bad input.