Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve exception message for unset VCF output type #1357

Merged
merged 4 commits into from
Apr 23, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ else if (STREAM_TYPES.contains(this.outType))

switch (typeToBuild) {
case UNSPECIFIED:
throw new IllegalArgumentException("Must specify file or stream output type.");
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?");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you're at it, why not take htsjdk.samtools.util.IOUtil#VCF_EXTENSIONS_LIST and present it to the user for reference?

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