Handle CloneNotSupportedException in a standard and most-correct way.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@17 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Ray Greenwell
2006-07-13 18:08:03 +00:00
parent 62104e811c
commit 005043bf6c
4 changed files with 5 additions and 8 deletions
+1 -2
View File
@@ -136,8 +136,7 @@ public class Tile // implements Cloneable
// try {
// return (Tile)super.clone();
// } catch (CloneNotSupportedException cnse) {
// String errmsg = "All is wrong with the universe: " + cnse;
// throw new RuntimeException(errmsg);
// throw new RuntimeException(cnse);
// }
// }
@@ -118,9 +118,9 @@ public abstract class MisoSceneModel extends SimpleStreamableObject
public Object clone ()
{
try {
return (MisoSceneModel)super.clone();
return super.clone();
} catch (CloneNotSupportedException cnse) {
throw new RuntimeException("MisoSceneModel.clone: " + cnse);
throw new RuntimeException(cnse);
}
}
@@ -154,8 +154,7 @@ public class ObjectInfo extends SimpleStreamableObject
try {
return super.clone();
} catch (CloneNotSupportedException cnse) {
// notgunnahappen.
return null;
throw new RuntimeException(cnse);
}
}
@@ -223,8 +223,7 @@ public class SparseMisoSceneModel extends MisoSceneModel
section.objectInfo = (ObjectInfo[])objectInfo.clone();
return section;
} catch (CloneNotSupportedException cnse) {
throw new RuntimeException(
"SparseMisoSceneModel.Section.clone: " + cnse);
throw new RuntimeException(cnse);
}
}