Skip to content

Commit da61475

Browse files
committed
More informative error
1 parent eb73954 commit da61475

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/util/FastqcRunner.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,13 @@
4444
import java.io.InputStreamReader;
4545
import java.io.StringWriter;
4646
import java.util.ArrayList;
47+
import java.util.Arrays;
4748
import java.util.HashSet;
4849
import java.util.LinkedList;
4950
import java.util.List;
5051
import java.util.Map;
5152
import java.util.Set;
53+
import java.util.stream.Collectors;
5254
import java.util.zip.GZIPInputStream;
5355

5456
/**
@@ -350,6 +352,11 @@ private List<String> getBaseParams() throws FileNotFoundException
350352

351353
File libDir = new File(ModuleLoader.getInstance().getModule(SequenceAnalysisModule.NAME).getExplodedPath(), "lib");
352354
File coreLibDir = new File(ModuleLoader.getInstance().getModule("core").getExplodedPath(), "lib");
355+
if (!coreLibDir.exists())
356+
{
357+
throw new RuntimeException("Not found: " + coreLibDir.getPath());
358+
}
359+
353360
File fastqcDir = new File(libDir.getParentFile(), "external/fastqc");
354361
File bzJar = new File(libDir, "bzip2-0.9.1.jar");
355362
if (!bzJar.exists())
@@ -362,7 +369,9 @@ private List<String> getBaseParams() throws FileNotFoundException
362369
File commonsMath = new File(coreLibDir, "commons-math3-3.6.1.jar");
363370
if (!commonsMath.exists())
364371
{
365-
throw new RuntimeException("Not found: " + commonsMath.getPath());
372+
File[] files = coreLibDir.listFiles();
373+
String contents = files == null ? "null" : Arrays.stream(files).map(File::getName).filter(x -> x.contains("math")).collect(Collectors.joining(","));
374+
throw new RuntimeException("Not found: " + commonsMath.getPath() + ", files present: " + contents);
366375
}
367376

368377
List<String> classPath = new ArrayList<>();

0 commit comments

Comments
 (0)