Skip to content

Commit c24004d

Browse files
committed
Fix in Exception handling
* Exceptions are caught in the ExperimentManager class in order to log the errors. The exceptions were not being raised again #35
1 parent 9d9f6d1 commit c24004d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

MLC/GUI/ExperimentsManager.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,21 @@ def import_experiment(self, experiment_path):
104104
try:
105105
self._mlc_local.import_experiment(experiment_path)
106106
except DuplicatedExperimentError:
107-
logger.error("Experiment {0} could not be imported. "
107+
logger.error("[GUI_EXPERIMENT_MANAGER] [IMPORT_EXPERIMENT] - "
108+
"Experiment {0} could not be imported. "
108109
"It already exists.".format(experiment_name))
110+
raise
109111
except ImportExperimentPathNotExistException, err:
110-
logger.error("Experiment {0} could not be imported. "
112+
logger.error("[GUI_EXPERIMENT_MANAGER] [IMPORT_EXPERIMENT] - "
113+
"Experiment {0} could not be imported. "
111114
"Experiment path given does not exists. Exception msg: {1}"
112115
.format(experiment_name, err))
116+
raise
113117
except Exception, err:
114-
logger.error("Experiment {0} could not be imported. {1}"
118+
logger.error("[GUI_EXPERIMENT_MANAGER] [IMPORT_EXPERIMENT] - "
119+
"Experiment {0} could not be imported. {1}"
115120
.format(experiment_name, err))
121+
raise
116122

117123
self._experiment_list.append(experiment_name)
118124
self.load_experiment_info(experiment_name)

0 commit comments

Comments
 (0)