Skip to content

Commit

Permalink
Merge pull request #1098 from metno/colocation-exceptions
Browse files Browse the repository at this point in the history
ensure exceptions are not silently suppressed
  • Loading branch information
heikoklein authored Apr 8, 2024
2 parents 7077d96 + 711c0c5 commit 4032e09
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pyaerocom/colocation_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,12 +851,13 @@ def run(self, var_list: list = None, **opts):
# ToDo: see if the following could be solved via custom context manager
try:
vars_to_process = self.prepare_run(var_list)
except Exception:
except Exception as ex:
logger.exception(ex)
if self.raise_exceptions:
self._print_processing_status()
self._write_log("ABORTED: raise_exceptions is True\n")
self._write_log(f"ABORTED: raise_exceptions is True: {traceback.format_exc()}\n")
self._close_log()
raise
raise ex
vars_to_process = {}
self._print_coloc_info(vars_to_process)
for mod_var, obs_var in vars_to_process.items():
Expand Down

0 comments on commit 4032e09

Please sign in to comment.