Skip to content

Commit f2df518

Browse files
committed
fix(sdk): catch Throwable instead of RuntimeException to handle them all
1 parent 7e8856d commit f2df518

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

engine/core/src/main/java/com/codingame/gameengine/core/GameManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ void start(InputStream is, PrintStream out) {
152152

153153
s.close();
154154

155-
} catch (RuntimeException e) {
155+
} catch (Throwable e) {
156156
dumpFail(e);
157157
s.close();
158158
throw e;
@@ -262,7 +262,7 @@ private void dumpScores() {
262262
out.println(data);
263263
}
264264

265-
private void dumpFail(RuntimeException e) {
265+
private void dumpFail(Throwable e) {
266266
OutputData data = new OutputData(OutputCommand.FAIL);
267267
StringWriter sw = new StringWriter();
268268
PrintWriter pw = new PrintWriter(sw);

0 commit comments

Comments
 (0)