Skip to content

Commit

Permalink
Add valid VCF extensions and attempted outPath to exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
clintval committed Apr 23, 2019
1 parent a76fc8f commit 146fd1a
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
import java.nio.file.Path;
import java.util.EnumSet;

import static htsjdk.samtools.util.IOUtil.VCF_EXTENSIONS_LIST;

/*
* Created with IntelliJ IDEA.
* User: thibault
Expand Down Expand Up @@ -453,7 +455,14 @@ else if (STREAM_TYPES.contains(this.outType))

switch (typeToBuild) {
case UNSPECIFIED:
throw new IllegalArgumentException("Output format type is not set, or could not be inferred from the output path. If a path was used, does it have a valid VCF extension?");
throw new IllegalArgumentException(
"Output format type is not set, or could not be inferred from the output path. "
+ "If a path was used, does it have a valid VCF extension, such as "
+ String.join(", ", VCF_EXTENSIONS_LIST)
+ "? "
+ "Output path attempted: "
+ outPath.toString()
);
case VCF:
if ((refDict == null) && (options.contains(Options.INDEX_ON_THE_FLY)))
throw new IllegalArgumentException("A reference dictionary is required for creating Tribble indices on the fly");
Expand Down

0 comments on commit 146fd1a

Please sign in to comment.