private void throwNotSerializable(Object o, Throwable t) {
String msg = String.format(
"Object of type %s expected to be marshallable", o.getClass());
if (t == null)
throw new NotSerializableException(msg);
else
throw new NotSerializableException(msg, t);
}