From 6404d3e0abecb67594e2976342367b1b002c76a0 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Thu, 13 Jul 2006 18:10:55 +0000 Subject: [PATCH] Preserve the stack trace when CloneNotSupportedException impossibly happens. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@21 c613c5cb-e716-0410-b11b-feb51c14d237 --- src/java/com/threerings/parlor/game/data/GameConfig.java | 2 +- src/java/com/threerings/puzzle/data/Board.java | 4 ++-- src/java/com/threerings/stage/data/StageLocation.java | 2 +- src/java/com/threerings/whirled/spot/data/Portal.java | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/java/com/threerings/parlor/game/data/GameConfig.java b/src/java/com/threerings/parlor/game/data/GameConfig.java index 274c10ed..03e29039 100644 --- a/src/java/com/threerings/parlor/game/data/GameConfig.java +++ b/src/java/com/threerings/parlor/game/data/GameConfig.java @@ -146,7 +146,7 @@ public abstract class GameConfig extends PlaceConfig implements Cloneable try { return super.clone(); } catch (CloneNotSupportedException cnse) { - throw new RuntimeException("clone() failed: " + cnse); + throw new RuntimeException(cnse); } } } diff --git a/src/java/com/threerings/puzzle/data/Board.java b/src/java/com/threerings/puzzle/data/Board.java index ebbdd816..b944f9db 100644 --- a/src/java/com/threerings/puzzle/data/Board.java +++ b/src/java/com/threerings/puzzle/data/Board.java @@ -55,7 +55,7 @@ public abstract class Board board._rando = (BoardRandom)_rando.clone(); return board; } catch (CloneNotSupportedException cnse) { - throw new RuntimeException("All is wrong with universe."); + throw new RuntimeException(cnse); } } @@ -175,7 +175,7 @@ public abstract class Board try { return super.clone(); } catch (CloneNotSupportedException cnse) { - throw new RuntimeException("All is wrong with universe."); + throw new RuntimeException(cnse); } } diff --git a/src/java/com/threerings/stage/data/StageLocation.java b/src/java/com/threerings/stage/data/StageLocation.java index 5c7c6d52..3307432a 100644 --- a/src/java/com/threerings/stage/data/StageLocation.java +++ b/src/java/com/threerings/stage/data/StageLocation.java @@ -127,7 +127,7 @@ public class StageLocation extends SimpleStreamableObject try { return (StageLocation)super.clone(); } catch (CloneNotSupportedException cnse) { - throw new RuntimeException("StageLocation.clone() failed " + cnse); + throw new RuntimeException(cnse); } } } diff --git a/src/java/com/threerings/whirled/spot/data/Portal.java b/src/java/com/threerings/whirled/spot/data/Portal.java index 5b83b627..088b6d42 100644 --- a/src/java/com/threerings/whirled/spot/data/Portal.java +++ b/src/java/com/threerings/whirled/spot/data/Portal.java @@ -90,9 +90,9 @@ public class Portal extends SimpleStreamableObject public Object clone () { try { - return (Portal)super.clone(); + return super.clone(); } catch (CloneNotSupportedException cnse) { - throw new RuntimeException("Portal.clone() failed " + cnse); + throw new RuntimeException(cnse); } }