Skip to content

Commit

Permalink
Backport PR spacetelescope#2807: cubeviz spectral extraction: send ex…
Browse files Browse the repository at this point in the history
…ceptions to snackbar (spacetelescope#2813)

Co-authored-by: Kyle Conroy <kyleconroy@gmail.com>
  • Loading branch information
meeseeksmachine and kecnry authored Apr 17, 2024
1 parent b944b04 commit c891f79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Bug Fixes
Cubeviz
^^^^^^^

- Spectral extraction errors will show in snackbar. [#2807]

Imviz
^^^^^

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,12 @@ def get_aperture(self):
return mask_weights

def vue_spectral_extraction(self, *args, **kwargs):
self.collapse_to_spectrum(add_data=True)
try:
self.collapse_to_spectrum(add_data=True)
except Exception as e:
self.hub.broadcast(SnackbarMessage(
f"Extraction failed: {repr(e)}",
sender=self, color="error"))

def vue_save_as_fits(self, *args):
self._save_extracted_spec_to_fits()
Expand Down

0 comments on commit c891f79

Please sign in to comment.