Exceptions

This module defines its own exception classes, which all inherit from the base class CursesFzfException (which itself inherits from Exception). This allows users of the library to catch specific exceptions or handle all exceptions raised by FuzzyFinder in a unified way.

The most important exception is CursesFzfAborted, which indicates that the user has aborted the selection process (typically by pressing Ctrl+C or ESC).

Exception Reference

class curses_fzf.CursesFzfException[source]

Bases: Exception

Base exception class for FuzzyFinder. You can catch this exception to handle all exceptions raised by this module.

class curses_fzf.CursesFzfAborted[source]

Bases: CursesFzfException

Exception raised when FuzzyFinder is aborted by the user (e.g. by pressing Ctrl+C or ESC).

class curses_fzf.CursesFzfAssertion[source]

Bases: CursesFzfException

Exception raised when an assertion fails in FuzzyFinder. E.g. if the given display() function returns multi-line text.

class curses_fzf.CursesFzfIndexOutOfBounds[source]

Bases: CursesFzfAssertion

Exception raised when an index violation occurs. E.g. if FuzzyFinder’s user tries to access the query at an invalid index using kb_add_to_query().