diff --git a/src/java/com/threerings/presents/io/TypedObjectFactory.java b/src/java/com/threerings/presents/io/TypedObjectFactory.java index 80123310a..8ecc18f7d 100644 --- a/src/java/com/threerings/presents/io/TypedObjectFactory.java +++ b/src/java/com/threerings/presents/io/TypedObjectFactory.java @@ -1,5 +1,5 @@ // -// $Id: TypedObjectFactory.java,v 1.5 2001/06/11 17:44:04 mdb Exp $ +// $Id: TypedObjectFactory.java,v 1.6 2001/06/13 05:16:25 mdb Exp $ package com.threerings.cocktail.cher.io; @@ -8,6 +8,8 @@ import java.io.DataInputStream; import java.io.DataOutputStream; import java.util.HashMap; +import com.threerings.cocktail.cher.Log; + /** * The encodable factory is used to unserialize encodable object instances * from a stream. It maintains a mapping of encodable object classes to @@ -84,8 +86,12 @@ public class TypedObjectFactory try { return (TypedObject)clazz.newInstance(); } catch (Throwable t) { + Log.warning("Typed object error: " + t); + Log.logStackTrace(t); + String errmsg = "Unable to instantiate typed object " + - "[class=" + clazz.getName() + ", error=" + t + "]."; + "[class=" + clazz.getName() + + ", error=" + t.getMessage() + "]."; throw new ObjectStreamException(errmsg); } }