소스 검색

use specialized exception for interrupted sleep

tags/2.0.1
Jonathan Cobb 4 년 전
부모
커밋
1594a1ade1
2개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  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 파일 보기

@@ -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 파일 보기

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

public class SleepInterruptedException extends IllegalStateException {

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

}

불러오는 중...
취소
저장