Skip to content
Snippets Groups Projects
Commit 2badc222 authored by felmer's avatar felmer
Browse files

logging improved

SVN: 20562
parent c83f339a
No related branches found
No related tags found
No related merge requests found
...@@ -339,19 +339,19 @@ class DatasetMappingResolver ...@@ -339,19 +339,19 @@ class DatasetMappingResolver
private boolean sampleExistsAndBelongsToExperiment(DataSetMappingInformation mapping, private boolean sampleExistsAndBelongsToExperiment(DataSetMappingInformation mapping,
String sampleCode, LogUtils log) String sampleCode, LogUtils log)
{ {
if (isConnectedToExperiment(mapping, sampleCode, log) == false) SampleIdentifier sampleIdentifier = createSampleIdentifier(sampleCode, mapping);
if (isConnectedToExperiment(mapping, sampleIdentifier, log) == false)
{ {
log.datasetMappingError(mapping, "sample with the code '%s' does not exist" log.datasetMappingError(mapping, "sample '%s' does not exist"
+ " or is not connected to any experiment", sampleCode); + " or is not connected to any experiment.", sampleIdentifier);
return false; return false;
} }
return true; return true;
} }
private boolean isConnectedToExperiment(DataSetMappingInformation mapping, String sampleCode, private boolean isConnectedToExperiment(DataSetMappingInformation mapping,
LogUtils log) SampleIdentifier sampleIdentifier, LogUtils log)
{ {
SampleIdentifier sampleIdentifier = createSampleIdentifier(sampleCode, mapping);
try try
{ {
Sample sample = openbisService.tryGetSampleWithExperiment(sampleIdentifier); Sample sample = openbisService.tryGetSampleWithExperiment(sampleIdentifier);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment