From fc91faf25f31964f42d0806627aaa334d3681c2d Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Thu, 13 Jul 2006 18:07:27 +0000 Subject: [PATCH] Standardized what we do in cases where a CloneNotSupportedException occurs where we don't think it ever will. Instead of returning null, or the exception, always throw a runtime with just the CloneNotSupportedException as the argument, as this will contain the most information and will preserve the stack trace. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4264 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/crowd/data/OccupantInfo.java | 2 +- src/java/com/threerings/presents/dobj/DSet.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/com/threerings/crowd/data/OccupantInfo.java b/src/java/com/threerings/crowd/data/OccupantInfo.java index 18308c721..7abb05725 100644 --- a/src/java/com/threerings/crowd/data/OccupantInfo.java +++ b/src/java/com/threerings/crowd/data/OccupantInfo.java @@ -104,7 +104,7 @@ public class OccupantInfo extends SimpleStreamableObject try { return super.clone(); } catch (CloneNotSupportedException cnse) { - throw new RuntimeException("WTF? " + cnse); + throw new RuntimeException(cnse); } } } diff --git a/src/java/com/threerings/presents/dobj/DSet.java b/src/java/com/threerings/presents/dobj/DSet.java index 68d6efc56..6f61b383c 100644 --- a/src/java/com/threerings/presents/dobj/DSet.java +++ b/src/java/com/threerings/presents/dobj/DSet.java @@ -397,7 +397,7 @@ public class DSet nset._modCount = 0; return nset; } catch (CloneNotSupportedException cnse) { - throw new RuntimeException("WTF? " + cnse); + throw new RuntimeException(cnse); } }