From b0a08eda3f080be84d27dc34f2dcffc81383b237 Mon Sep 17 00:00:00 2001 From: parkera <parkera> Date: Wed, 14 Sep 2016 13:55:03 +0000 Subject: [PATCH] SSDM-3897: Include search domains in generic openbis UI - changed the exception to a user friendly warning when no Blast DB found SVN: 37079 --- .../openbis/dss/generic/shared/utils/BlastUtils.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/utils/BlastUtils.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/utils/BlastUtils.java index 86ab389e4eb..b7e037a95ce 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/utils/BlastUtils.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/utils/BlastUtils.java @@ -30,7 +30,7 @@ import org.apache.commons.lang.SystemUtils; import org.apache.log4j.Logger; import ch.rinn.restrictions.Private; -import ch.systemsx.cisd.common.exceptions.EnvironmentFailureException; +import ch.systemsx.cisd.common.exceptions.UserFailureException; import ch.systemsx.cisd.common.fasta.SequenceType; import ch.systemsx.cisd.common.logging.LogCategory; import ch.systemsx.cisd.common.logging.LogFactory; @@ -186,14 +186,9 @@ public class BlastUtils { return output; } - StringBuilder builder = new StringBuilder("Execution failed: ").append(command); - List<String> lines = processResult.isBinaryOutput() ? processResult.getErrorOutput() : output; - for (String line : lines) - { - builder.append("\n").append(line); - } processResult.log(); - throw new EnvironmentFailureException(builder.toString()); + String message = "Couldn't find any results. The reason is most likely that the BLAST database has been populated"; + throw new UserFailureException(message); } public File getBlastDatabaseFolder(Properties properties, File storeRoot) -- GitLab