Skip to content
Snippets Groups Projects
Commit 93f2ae89 authored by tpylak's avatar tpylak
Browse files

minor: better error handling when no images are available

SVN: 22438
parent 5d6e66c1
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,7 @@ import ch.rinn.restrictions.Private;
import ch.systemsx.cisd.base.image.IImageTransformerFactory;
import ch.systemsx.cisd.bds.hcs.Location;
import ch.systemsx.cisd.common.exceptions.EnvironmentFailureException;
import ch.systemsx.cisd.common.exceptions.UserFailureException;
import ch.systemsx.cisd.common.io.ByteArrayBasedContent;
import ch.systemsx.cisd.common.io.IContent;
import ch.systemsx.cisd.common.logging.LogCategory;
......@@ -130,6 +131,10 @@ public class ImageChannelsUtils
}
}
}
if (image == null)
{
throw new UserFailureException("No image is available for parameters: " + params);
}
return createResponseContentStream(image, null);
}
......
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