'Bug' fix: fix the error message from the vcf validator so people realize that the file fails strict validation but still adheres to the spec.

This commit is contained in:
Eric Banks 2012-10-29 16:29:27 -04:00
parent 4e661847b2
commit be902375ac
2 changed files with 7 additions and 1 deletions

View File

@ -172,7 +172,7 @@ public class ValidateVariants extends RodWalker<Integer, Integer> {
numErrors++; numErrors++;
logger.warn("***** " + e.getMessage() + " *****"); logger.warn("***** " + e.getMessage() + " *****");
} else { } else {
throw new UserException.MalformedFile(file, e.getMessage()); throw new UserException.FailsStrictValidation(file, e.getMessage());
} }
} }
} }

View File

@ -283,6 +283,12 @@ public class UserException extends ReviewedStingException {
} }
} }
public static class FailsStrictValidation extends UserException {
public FailsStrictValidation(File f, String message) {
super(String.format("File %s fails strict validation: %s", f.getAbsolutePath(), message));
}
}
public static class MalformedFile extends UserException { public static class MalformedFile extends UserException {
public MalformedFile(String message) { public MalformedFile(String message) {
super(String.format("Unknown file is malformed: %s", message)); super(String.format("Unknown file is malformed: %s", message));