Better error messages

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@79 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
depristo 2009-03-17 15:37:02 +00:00
parent 0fd55d91d2
commit 478425b3d8
2 changed files with 3 additions and 2 deletions

View File

@ -114,7 +114,7 @@ public class TraversalEngine {
public void setDebugging( final boolean d ) { DEBUGGING = d; }
public void setSafetyChecking( final boolean beSafeP ) {
if ( ! beSafeP )
System.out.printf("*** Turning off safety checking, I hope you know what you are doing...%n");
System.out.printf("*** Turning off safety checking, I hope you know what you are doing. Errors will result in debugging assert failures and other inscrutable messages...%n");
this.beSafeP = beSafeP;
}

View File

@ -116,7 +116,8 @@ public class ReferenceIterator implements Iterator<ReferenceIterator> {
// we're somewhere on this contig
if ( seekOffset < offset || seekOffset >= currentContig.length() ) {
// bad boy -- can't go backward safely or just beyond the contig length
throw new IllegalArgumentException("Bad seek to " + seekOffset + " current: " + offset);
throw new IllegalArgumentException(String.format("Invalid seek to %s from %s, which is usually due to out of order reads%n",
new GenomeLoc(currentContig.getName(), seekOffset), new GenomeLoc(currentContig.getName(), offset)));
//return null;
}
else {