betty.gui.error module

Provide error handling for the Graphical User Interface.

class betty.gui.error.Error[source]

Bases: BettyMainWindow

An error window.

Parameters:
__init__(app: betty.app.App, message: betty.locale.Localizable, *, parent: PyQt6.QtCore.QObject, close_parent: bool = False)[source]
Parameters:
closeEvent(a0: PyQt6.QtGui.QCloseEvent | None) None[source]
Parameters:

a0 (PyQt6.QtGui.QCloseEvent | None)

Return type:

None

window_height = 300

The window’s default height in pixels.

property window_title: Localizable

The human-readable short title of this window.

window_width = 500

The window’s default width in pixels.

class betty.gui.error.ExceptionCatcher[source]

Bases: Generic[_P, _T]

Catch any exception and show an error window instead.

Parameters:
  • parent (PyQt6.QtCore.QObject)

  • close_parent (bool)

__init__(parent: PyQt6.QtCore.QObject, *, close_parent: bool = False)[source]
Parameters:
  • parent (PyQt6.QtCore.QObject)

  • close_parent (bool)

class betty.gui.error.ExceptionError[source]

Bases: Error

An error window for a specific exception.

Parameters:
__init__(app: betty.app.App, message: betty.locale.Localizable, error_type: type[BaseException], *, parent: PyQt6.QtCore.QObject, close_parent: bool = False)[source]
Parameters: