From 00450dca019735c7eec5c208925ff18aab4a1bd4 Mon Sep 17 00:00:00 2001 From: melvin Date: Mon, 29 Aug 2011 00:07:55 +0800 Subject: [PATCH] moved crash handling to MagicGameReport --- src/magic/ui/GamePanel.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/magic/ui/GamePanel.java b/src/magic/ui/GamePanel.java index 9c122ed19a..6a3d199ca4 100644 --- a/src/magic/ui/GamePanel.java +++ b/src/magic/ui/GamePanel.java @@ -219,18 +219,7 @@ public final class GamePanel extends JPanel { try { //handle any unrecoverable exception in the controller controller.runGame(); } catch (final Throwable ex) { - //unrecoverable error has occurred! - try { - //buildReport might throw an exception - System.err.println(MagicGameReport.buildReport(game)); - } catch (final Throwable ex2) { - System.err.println("Exception from MagicGameReport.buildReport:"); - System.err.println(ex2.getMessage()); - ex2.printStackTrace(); - } - System.err.println("Exception from controller.runGame:"); - System.err.println(ex.getMessage()); - ex.printStackTrace(); + MagicGameReport.buildReport(game, ex); System.exit(1); } System.err.println("Stopping game...");