Ver a proveniência

use specialized exception for interrupted sleep

tags/2.0.1
Jonathan Cobb há 4 anos
ascendente
cometimento
1594a1ade1
2 ficheiros alterados com 8 adições e 1 eliminações
  1. +1
    -1
      src/main/java/org/cobbzilla/util/system/Sleep.java
  2. +7
    -0
      src/main/java/org/cobbzilla/util/system/SleepInterruptedException.java

+ 1
- 1
src/main/java/org/cobbzilla/util/system/Sleep.java Ver ficheiro

@@ -25,7 +25,7 @@ public class Sleep {
try {
Thread.sleep(millis);
} catch (InterruptedException e) {
throw new IllegalStateException("sleep interrupted (" + reason + ")");
throw new SleepInterruptedException("sleep interrupted (" + reason + ")");
}
}



+ 7
- 0
src/main/java/org/cobbzilla/util/system/SleepInterruptedException.java Ver ficheiro

@@ -0,0 +1,7 @@
package org.cobbzilla.util.system;

public class SleepInterruptedException extends IllegalStateException {

public SleepInterruptedException(String msg) { super(msg); }

}

Carregando…
Cancelar
Guardar