Salome HOME
The draft of the "Copy from existing study" action is added. The YACS step is introdu...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / StudyServiceImpl.java
index 5cd8631a3b3d80d1c697355d9158751c4ada02f0..d6bf598962b848b99a8c3eabad3be6d38c9481c9 100644 (file)
@@ -68,6 +68,7 @@ import org.splat.dal.dao.som.ScenarioDAO;
 import org.splat.dal.dao.som.StudyDAO;
 import org.splat.dal.dao.som.UsedByRelationDAO;
 import org.splat.dal.dao.som.ValidationCycleDAO;
+import org.splat.exception.BusinessException;
 import org.splat.exception.IncompatibleDataException;
 import org.splat.exception.InvalidParameterException;
 import org.splat.kernel.InvalidPropertyException;
@@ -486,8 +487,8 @@ public class StudyServiceImpl implements StudyService {
                                aStudyDTO.getAllRelations().add(link); // RKV
 
                                validactor.put(cname, link.getTo()); // Replaces the cycle if exists as default,
-                       } catch (Exception error) {
-                               LOG.error("Unable to re-index Knowledge Elements, reason:",
+                       } catch (BusinessException error) {
+                               LOG.error("Unable to create validation cycle, reason:",
                                                error);
                                return;
                        }
@@ -1304,9 +1305,7 @@ public class StudyServiceImpl implements StudyService {
                                dataset.addSeries(series);
 
                        } catch (FileNotFoundException e) {
-                               // TODO Auto-generated catch block
-                               e.printStackTrace();
-                               return "ERROR";
+                               LOG.error("Sorry, the file is not found.", e);
                        }
                } // for
 
@@ -1345,11 +1344,9 @@ public class StudyServiceImpl implements StudyService {
                        document.close();
 
                } catch (FileNotFoundException e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
+                       LOG.error("Sorry, the file is not found.", e);
                } catch (DocumentException e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
+                       LOG.error("Sorry, the DocumentException is thrown.", e);
                }
 
                return resultPath;