Skip to content

Commit 8bfaf28

Browse files
authored
Merge pull request #922 from philipwhiuk/qfj-exceptionNotThrowable
Catch `Exception` not `Throwable` in `CompositeLog`
2 parents c4a795a + f321670 commit 8bfaf28

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

quickfixj-core/src/main/java/quickfix/CompositeLog.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ public void clear() {
4040
for (Log log : logs) {
4141
try {
4242
log.clear();
43-
} catch (Throwable e) {
43+
} catch (Exception e) {
4444
handleError(e);
4545
}
4646
}
4747
}
4848

49-
private void handleError(Throwable e) {
49+
private void handleError(Exception e) {
5050
if (rethrowException) {
5151
throw new RuntimeException(e);
5252
}
@@ -57,7 +57,7 @@ public void onIncoming(String message) {
5757
for (Log log : logs) {
5858
try {
5959
log.onIncoming(message);
60-
} catch (Throwable e) {
60+
} catch (Exception e) {
6161
handleError(e);
6262
}
6363
}
@@ -67,7 +67,7 @@ public void onOutgoing(String message) {
6767
for (Log log : logs) {
6868
try {
6969
log.onOutgoing(message);
70-
} catch (Throwable e) {
70+
} catch (Exception e) {
7171
defaultLog.error(e.getMessage() + ", continuing", e);
7272
}
7373
}
@@ -77,7 +77,7 @@ public void onEvent(String text) {
7777
for (Log log : logs) {
7878
try {
7979
log.onEvent(text);
80-
} catch (Throwable e) {
80+
} catch (Exception e) {
8181
handleError(e);
8282
}
8383
}
@@ -87,7 +87,7 @@ public void onErrorEvent(String text) {
8787
for (Log log : logs) {
8888
try {
8989
log.onErrorEvent(text);
90-
} catch (Throwable e) {
90+
} catch (Exception e) {
9191
handleError(e);
9292
}
9393
}

0 commit comments

Comments
 (0)