diff --git a/shanoir-ng-datasets/src/main/java/org/shanoir/ng/importer/dto/Serie.java b/shanoir-ng-datasets/src/main/java/org/shanoir/ng/importer/dto/Serie.java index 86b6159ae4..8447d4c985 100644 --- a/shanoir-ng-datasets/src/main/java/org/shanoir/ng/importer/dto/Serie.java +++ b/shanoir-ng-datasets/src/main/java/org/shanoir/ng/importer/dto/Serie.java @@ -245,10 +245,11 @@ public void setSequenceName(String sequenceName) { public DatasetFile getFirstDatasetFileForCurrentSerie() { if (getDatasets() == null - || getDatasets().get(0) == null - || getDatasets().get(0).getExpressionFormats() == null - || getDatasets().get(0).getExpressionFormats().get(0) == null - || getDatasets().get(0).getExpressionFormats().get(0).getDatasetFiles() == null) { + || getDatasets().get(0) == null + || getDatasets().get(0).getExpressionFormats() == null + || getDatasets().get(0).getExpressionFormats().get(0) == null + || getDatasets().get(0).getExpressionFormats().get(0).getDatasetFiles() == null + || getDatasets().get(0).getExpressionFormats().get(0).getDatasetFiles().get(0) == null) { return null; } return getDatasets().get(0).getExpressionFormats().get(0).getDatasetFiles().get(0); diff --git a/shanoir-ng-datasets/src/main/java/org/shanoir/ng/importer/service/ImporterService.java b/shanoir-ng-datasets/src/main/java/org/shanoir/ng/importer/service/ImporterService.java index 93db909824..2f38a45451 100644 --- a/shanoir-ng-datasets/src/main/java/org/shanoir/ng/importer/service/ImporterService.java +++ b/shanoir-ng-datasets/src/main/java/org/shanoir/ng/importer/service/ImporterService.java @@ -221,7 +221,7 @@ private Set generateAcquisitions(Examination examination, Im try { dicomAttributes = dicomProcessing.getDicomObjectAttributes(serie.getFirstDatasetFileForCurrentSerie(), serie.getIsEnhanced()); } catch (IOException e) { - throw new ShanoirException("Unable to retrieve dicom attributes in file " + serie.getFirstDatasetFileForCurrentSerie().getPath(), e); + throw new ShanoirException("Unable to retrieve dicom attributes in serie: " + serie.getSeriesDescription(), e); } // Generate acquisition object with all sub objects : datasets, protocols, expressions, ...