libvt.exc

Exceptions raised by libvt.

exception libvt.exc.LibVtError
exception[source]
exception[source]
exception libvt.exc.LibVtError

Bases: Exception

Base exception for all libvt errors.

exception libvt.exc.ProtocolError
exception[source]
exception[source]
exception libvt.exc.ProtocolError

Bases: LibVtError

Raised when Policy.strict rejects a malformed or unsupported sequence.

exception libvt.exc.ScreenAssertionError
exception[source]
exception[source]
exception libvt.exc.ScreenAssertionError

Bases: LibVtError, AssertionError

Raised when assert_screen() detects a screen mismatch.

exception libvt.exc.TerminalTimeoutError
exception[source]
exception[source]
exception libvt.exc.TerminalTimeoutError

Bases: LibVtError, TimeoutError

Raised when an async terminal stream or PTY wait exceeds its deadline.

Parameters:
  • message (str | None) – Concise single-line error summary; omitted when None.

  • parser_state (ParserState | None) – Parser state at timeout or premature EOF.

  • screen_text (str) – Visible screen text at failure time.

  • recent_bytes (collections.abc.Buffer) – Trailing raw bytes from FlightRecorder.

  • eof (bool) – True when the stream closed before the predicate matched.

  • diagnostics (str) – Pre-rendered viewport box and flight-recorder diagnostic block.

  • attach_note (bool) – When True (default), attach formatted diagnostics via PEP 678 BaseException.add_note() while keeping str(exc) single-line.

exception libvt.exc.UnsafePasteError
exception[source]
exception[source]
exception libvt.exc.UnsafePasteError

Bases: LibVtError

Raised when pasted text contains control or bracket-escape bytes.