Merge branch 'master' of ssh://nickel.broadinstitute.org/humgen/gsa-scr1/gsa-engineering/git/unstable
This commit is contained in:
commit
589df6b7cf
|
|
@ -380,7 +380,7 @@ class RodBindingArgumentTypeDescriptor extends ArgumentTypeDescriptor {
|
||||||
|
|
||||||
if ( tribbleType == null )
|
if ( tribbleType == null )
|
||||||
if ( ! file.canRead() | ! file.isFile() ) {
|
if ( ! file.canRead() | ! file.isFile() ) {
|
||||||
throw new UserException.BadArgumentValue(name, "Couldn't read file to determine type: " + file);
|
throw new UserException.CouldNotReadInputFile(file, "file does exist or couldn't be read");
|
||||||
} else {
|
} else {
|
||||||
throw new UserException.CommandLineException(
|
throw new UserException.CommandLineException(
|
||||||
String.format("No tribble type was provided on the command line and the type of the file could not be determined dynamically. " +
|
String.format("No tribble type was provided on the command line and the type of the file could not be determined dynamically. " +
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ public class SimpleTimer {
|
||||||
* @return the name associated with this timer
|
* @return the name associated with this timer
|
||||||
*/
|
*/
|
||||||
@Ensures("result != null")
|
@Ensures("result != null")
|
||||||
public String getName() {
|
public synchronized String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -82,14 +82,14 @@ public class SimpleTimer {
|
||||||
/**
|
/**
|
||||||
* @return is this timer running?
|
* @return is this timer running?
|
||||||
*/
|
*/
|
||||||
public boolean isRunning() {
|
public synchronized boolean isRunning() {
|
||||||
return running;
|
return running;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return A convenience function to obtain the current time in milliseconds from this timer
|
* @return A convenience function to obtain the current time in milliseconds from this timer
|
||||||
*/
|
*/
|
||||||
public long currentTime() {
|
public synchronized long currentTime() {
|
||||||
return System.currentTimeMillis();
|
return System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -119,8 +119,4 @@ public class SimpleTimer {
|
||||||
public synchronized double getElapsedTime() {
|
public synchronized double getElapsedTime() {
|
||||||
return (running ? (currentTime() - startTime + elapsed) : elapsed) / 1000.0;
|
return (running ? (currentTime() - startTime + elapsed) : elapsed) / 1000.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printElapsedTime(PrintStream out) {
|
|
||||||
out.printf("SimpleTimer %s: %.2f%n", name, getElapsedTime());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,10 @@ public class UserException extends ReviewedStingException {
|
||||||
super(String.format("Couldn't read file because %s caused by %s", message, e.getMessage()));
|
super(String.format("Couldn't read file because %s caused by %s", message, e.getMessage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CouldNotReadInputFile(File file) {
|
||||||
|
super(String.format("Couldn't read file %s", file.getAbsolutePath()));
|
||||||
|
}
|
||||||
|
|
||||||
public CouldNotReadInputFile(File file, String message) {
|
public CouldNotReadInputFile(File file, String message) {
|
||||||
super(String.format("Couldn't read file %s because %s", file.getAbsolutePath(), message));
|
super(String.format("Couldn't read file %s because %s", file.getAbsolutePath(), message));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue