From a8f24a735e26acad7deaf31ae6ad8f4a50694b8f Mon Sep 17 00:00:00 2001
From: Jorrit Schaap <schaap@astron.nl>
Date: Wed, 6 Feb 2019 08:11:47 +0000
Subject: [PATCH] SW-488: try/except/log for individual steps

---
 MAC/Services/TBB/TBBServer/lib/tbbservice.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/MAC/Services/TBB/TBBServer/lib/tbbservice.py b/MAC/Services/TBB/TBBServer/lib/tbbservice.py
index 37bf908499c..b9b923a8e39 100644
--- a/MAC/Services/TBB/TBBServer/lib/tbbservice.py
+++ b/MAC/Services/TBB/TBBServer/lib/tbbservice.py
@@ -533,9 +533,15 @@ class TBBControlService:
             logger.exception('Could not create storage map. Will try to dump anyway.')
 
         # start upload
-        self.upload_data(lcus_str, dm, starttime, duration, subbands, waittime, boards)
+        try:
+            self.upload_data(lcus_str, dm, starttime, duration, subbands, waittime, boards)
+        except:
+            logger.exception('Error while uploading tbb data to cep.')
 
-        self._add_meta_data_to_h5_files(output_path)
+        try:
+            self._add_meta_data_to_h5_files(output_path)
+        except:
+            logger.exception('Error adding meta-data to h5 files in %s.' % (output_path,))
 
         # restart recording
         self.restart_recording(lcus_str)
-- 
GitLab