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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -397,7 +397,7 @@ public class DSet<E extends DSet.Entry>
|
||||
nset._modCount = 0;
|
||||
return nset;
|
||||
} catch (CloneNotSupportedException cnse) {
|
||||
throw new RuntimeException("WTF? " + cnse);
|
||||
throw new RuntimeException(cnse);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user