Skip to content

Commit

Permalink
[Fix] Gracefully close in case of error
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Bettini <[email protected]>
  • Loading branch information
matteobettini committed Sep 22, 2023
1 parent 7aa4e8b commit d671c4d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion benchmarl/experiment/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down

0 comments on commit d671c4d

Please sign in to comment.