Exception: RatatuiRuby::Error::Invariant
- Inherits:
-
RatatuiRuby::Error
- Object
- StandardError
- RatatuiRuby::Error
- RatatuiRuby::Error::Invariant
- Defined in:
- lib/ratatui_ruby.rb
Overview
Invariant violation.
The library enforces rules about valid states and contracts. Breaking these rules raises this error.
Common causes:
-
Calling methods in the wrong order (e.g.,
init_terminaltwice) -
Callable return type mismatch (e.g., view returns
nilinstead of a widget)
To resolve, check the method’s documented contract. Ensure state preconditions are met and return types are correct.
Example
– SPDX-SnippetBegin SPDX-FileCopyrightText: 2026 Kerrick Long SPDX-License-Identifier: MIT-0 ++
RatatuiRuby.init_terminal
RatatuiRuby.init_terminal # => raises Error::Invariant
– SPDX-SnippetEnd ++