Describe the object which wasn't serializable (#404)

This commit is contained in:
Richard Shin
2016-09-03 18:10:03 -07:00
committed by Robert Nishihara
parent 6f2ed775a2
commit a5df45a92e
+4 -1
View File
@@ -362,7 +362,10 @@ int serialize(PyObject* worker_capsule, PyObject* val, Obj* obj, std::vector<Obj
}
Py_DECREF(array); // TODO(rkn): is this right?
} else {
PyErr_SetString(RayError, "serialization: type not know");
std::stringstream ss;
ss << "serialization: type of " << PyString_AS_STRING(PyObject_Repr(val))
<< " not recognized";
PyErr_SetString(RayError, ss.str().c_str());
return -1;
}
return 0;