+1 to this. Future.exception(sys.error("Could not cast %s of type: %s to %s".format(object, object.getClass, manifest[V].erasure)))