improved logging
This commit is contained in:
@@ -58,7 +58,13 @@ class AppWindowPreprocessMixin:
|
||||
"""Clear selected preprocess sets when radar-key-defining settings change."""
|
||||
try:
|
||||
radar_key = self._radar_key_from_ui()
|
||||
except Exception:
|
||||
except Exception as exc: # noqa: BLE001
|
||||
# Radar fields can be mid-edit (empty/partial) while signals fire; the
|
||||
# key cannot be computed yet, so skip until the inputs are valid again.
|
||||
self._log_debug(
|
||||
f"Skipping preprocess-selection reset; radar key unavailable: "
|
||||
f"{type(exc).__name__}: {exc}"
|
||||
)
|
||||
return
|
||||
|
||||
previous_radar_key = getattr(self, "_selected_preprocess_radar_key", radar_key)
|
||||
@@ -778,8 +784,11 @@ class AppWindowPreprocessMixin:
|
||||
)
|
||||
|
||||
def _cleanup_capture_session(self) -> None:
|
||||
"""Close and clear current capture session object."""
|
||||
"""Close and clear the current capture session object."""
|
||||
if self._capture_session is not None:
|
||||
self._log_debug(
|
||||
f"Closing capture session: kind={self._capture_session.kind}."
|
||||
)
|
||||
self._capture_session.close()
|
||||
self._capture_session = None
|
||||
self._update_capture_dialog_state()
|
||||
|
||||
Reference in New Issue
Block a user