pypeit.dashboard.util module
Utilities for the PypeIt Dashboard GUI.
The central concern here is loud failures: by default an exception raised
inside a Qt slot is swallowed by the C++ event loop, so the application
silently misbehaves and the traceback is lost. These helpers ensure such
failures are logged with full tracebacks (per the Debugging plan in
pypeit_dashboard_coding.md).
Generated by JXP and Claude.
- pypeit.dashboard.util._dashboard_excepthook(exc_type, exc_value, exc_tb)[source]
Global exception hook that logs the full traceback through PypeIt’s logger before deferring to the default hook.
Generated by JXP and Claude.
- Parameters:
exc_type (type) – The exception class.
exc_value (BaseException) – The exception instance.
exc_tb (traceback) – The associated traceback object.
- Returns:
None.
- pypeit.dashboard.util.install_excepthook()[source]
Install the dashboard’s global
sys.excepthook(idempotent).Generated by JXP and Claude.
- Returns:
None.
- pypeit.dashboard.util.safe_slot(func)[source]
Decorate a Qt slot so any exception it raises is logged with a full traceback and then re-raised, instead of being silently swallowed by the Qt event loop.
Generated by JXP and Claude.
- Parameters:
func (callable) – The slot method to wrap.
- Returns:
The wrapped slot.
- Return type:
callable