Skip to content

Commit 76cf9c7

Browse files
committed
Remove "catch (Throwable..." which we don't condone...
1 parent adb0222 commit 76cf9c7

File tree

5 files changed

+432
-428
lines changed

5 files changed

+432
-428
lines changed

‎14/AudioPlayer/src/com/oreilly/demo/pa/ch14/AudioRecorder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public void run() {
121121
Thread.sleep(1000); // per sec
122122
timeupdater.sendEmptyMessage(0);
123123
}
124-
} catch (Throwable t) { }
124+
} catch (Exception t) { }
125125
}
126126

127127
private void playAudio() {

‎14/AudioPlayer/src/com/oreilly/demo/pa/ch14/AudioRecorderWAudioRecord.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public void run() {
100100
for(int i=0;i<readBytes;i++) {
101101
dos.writeShort(buffer[i]); // write out to file
102102
}
103-
} catch (Throwable t) {
103+
} catch (Exception t) {
104104
recordablestate = false;
105105
t.printStackTrace();
106106
}
@@ -151,7 +151,7 @@ public void run() {
151151
Thread.sleep(1000); // per sec
152152
timeupdater.sendEmptyMessage(0);
153153
}
154-
} catch (Throwable t) { }
154+
} catch (Exception t) { }
155155
}
156156

157157
private void playAudio() {

‎14/AudioPlayer/src/com/oreilly/demo/pa/ch14/VideoRecorder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public void run() {
119119
Thread.sleep(1000); // per sec
120120
timeupdater.sendEmptyMessage(0);
121121
}
122-
} catch (Throwable t) { }
122+
} catch (Exception t) { }
123123
}
124124

125125
private void playVideo() {

0 commit comments

Comments
 (0)