Improved Error handling.

This commit is contained in:
jupfi 2024-06-18 15:37:11 +02:00
parent 737441551b
commit 3587cb7b93

View file

@ -31,9 +31,11 @@ class DuckLimeNQRController(BaseSpectrometerController):
measurement_data = limenqr.run_sequence(sequence)
# Emit the data to the nqrduck core
if measurement_data:
self.emit_status_message("Finished Measurement")
self.emit_measurement_data(measurement_data)
else:
self.emit_measurement_error("Measurement failed - no data could be retrieved. Did you connect the spectrometer?")
def emit_measurement_data(self, measurement_data: Measurement) -> None:
"""Emits the measurement data to the GUI.