From d669036b887c1103c67af3e9c06f9c3de6f60dd9 Mon Sep 17 00:00:00 2001 From: melvin Date: Sun, 19 Jun 2011 18:36:16 +0800 Subject: [PATCH] replace catch Error with catch Throwable --- src/magic/data/IconImages.java | 7 ++----- src/magic/ui/GameController.java | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/magic/data/IconImages.java b/src/magic/data/IconImages.java index e865ff7eb6..259cfa3b69 100644 --- a/src/magic/data/IconImages.java +++ b/src/magic/data/IconImages.java @@ -263,7 +263,6 @@ public class IconImages { } private static ImageIcon loadAnimatedIcon(final String name) { - try { final byte data[]=new byte[1<<16]; int size=0; @@ -277,10 +276,8 @@ public class IconImages { size+=len; } return new ImageIcon(Arrays.copyOf(data,size)); - } catch (final Exception ex) { + } catch (final Throwable th) { return MISSING2; - } catch (final Error er) { - return MISSING2; - } + } } } diff --git a/src/magic/ui/GameController.java b/src/magic/ui/GameController.java index 082579806d..c6484f6aba 100644 --- a/src/magic/ui/GameController.java +++ b/src/magic/ui/GameController.java @@ -257,7 +257,7 @@ public class GameController { } } }); - } catch (Error err) { + } catch (final Throwable th) { //there will be an error if X windows is not present on Linux } }