diff --git a/benchmarl/experiment/experiment.py b/benchmarl/experiment/experiment.py index 8e24d8b5..48a090ca 100644 --- a/benchmarl/experiment/experiment.py +++ b/benchmarl/experiment/experiment.py @@ -317,7 +317,11 @@ def _setup_logger(self): ) def run(self): - self._collection_loop() + try: + self._collection_loop() + except Exception as err: + self.close() + raise err def _collection_loop(self):