Skip to content
Snippets Groups Projects
Commit 7ec91f14 authored by felmer's avatar felmer
Browse files

throw an exception instead of an AssertionError

SVN: 15259
parent 15db6cef
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,7 @@ import java.util.Map.Entry; ...@@ -33,6 +33,7 @@ import java.util.Map.Entry;
import org.apache.commons.lang.time.DateUtils; import org.apache.commons.lang.time.DateUtils;
import ch.rinn.restrictions.Friend; import ch.rinn.restrictions.Friend;
import ch.systemsx.cisd.common.exceptions.UserFailureException;
import ch.systemsx.cisd.common.types.BooleanOrUnknown; import ch.systemsx.cisd.common.types.BooleanOrUnknown;
import ch.systemsx.cisd.openbis.generic.server.business.bo.common.CodeRecord; import ch.systemsx.cisd.openbis.generic.server.business.bo.common.CodeRecord;
import ch.systemsx.cisd.openbis.generic.server.business.bo.common.EntityPropertiesEnricher; import ch.systemsx.cisd.openbis.generic.server.business.bo.common.EntityPropertiesEnricher;
...@@ -223,8 +224,7 @@ public class DatasetLister implements IDatasetLister ...@@ -223,8 +224,7 @@ public class DatasetLister implements IDatasetLister
return entry.getKey(); return entry.getKey();
} }
} }
assert false : "dataStore not found"; throw new UserFailureException("Data store '" + dataStoreCode + "' unknown.");
return null; // shouldn't happen
} }
private Long extractDataSetTypeId(String dataSetTypeCode) private Long extractDataSetTypeId(String dataSetTypeCode)
...@@ -236,8 +236,7 @@ public class DatasetLister implements IDatasetLister ...@@ -236,8 +236,7 @@ public class DatasetLister implements IDatasetLister
return entry.getKey(); return entry.getKey();
} }
} }
assert false : "dataSetType not found"; throw new UserFailureException("Data Set type '" + dataSetTypeCode + "' unknown.");
return null; // shouldn't happen
} }
private List<ExternalData> enrichDatasets(Iterable<DatasetRecord> datasets) private List<ExternalData> enrichDatasets(Iterable<DatasetRecord> datasets)
......
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