betty.gui.error module¶
Provide error handling for the Graphical User Interface.
- class betty.gui.error.Error[source]¶
Bases:
BettyMainWindow
An error window.
- Parameters:
app (
betty.app.App
)message (
betty.locale.Localizable
)parent (
PyQt6.QtCore.QObject
)close_parent (
bool
)
- __init__(app: betty.app.App, message: betty.locale.Localizable, *, parent: PyQt6.QtCore.QObject, close_parent: bool = False)[source]¶
- Parameters:
app (
betty.app.App
)message (
betty.locale.Localizable
)parent (
PyQt6.QtCore.QObject
)close_parent (
bool
)
- 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
)
- class betty.gui.error.ExceptionError[source]¶
Bases:
Error
An error window for a specific exception.
- Parameters:
app (
betty.app.App
)message (
betty.locale.Localizable
)error_type (
type
[BaseException
])parent (
PyQt6.QtCore.QObject
)close_parent (
bool
)
- __init__(app: betty.app.App, message: betty.locale.Localizable, error_type: type[BaseException], *, parent: PyQt6.QtCore.QObject, close_parent: bool = False)[source]¶
- Parameters:
app (
betty.app.App
)message (
betty.locale.Localizable
)error_type (
type
[BaseException
])parent (
PyQt6.QtCore.QObject
)close_parent (
bool
)