From 0480b022b726c71cda3ca59ef8c8633f6c84e8f6 Mon Sep 17 00:00:00 2001 From: Thomas Juerges <203795-tjuerges@users.noreply.gitlab.com> Date: Wed, 7 Jul 2021 16:03:44 +0200 Subject: [PATCH] L2SS-183: Do not silently return but rethrow the DevFailed exception with an explanation --- devices/devices/observation_control.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/devices/devices/observation_control.py b/devices/devices/observation_control.py index feaa9f0b9..58464c5a8 100644 --- a/devices/devices/observation_control.py +++ b/devices/devices/observation_control.py @@ -284,8 +284,9 @@ class ObservationControl(Device): # Create the Observation device and instantiate it. self.create_dynamic_device(class_name, device_name) except DevFailed as ex: - self.error_stream("Cannot create the Observation device instance {} for ID={}. This means that the observation did not start.".format(device_name, id)) - return + error_string = "Cannot create the Observation device instance {} for ID={}. This means that the observation did not start.".format(device_name, id) + self.error_stream(error_string) + Except.re_throw_exception(ex, "DevFailed", error_string, __name__) try: # Instantiate a dynamic Tango Device "Observation". -- GitLab