Skip to content

Commit 1ca9c70

Browse files
authored
Throw SerializationError instead of SymEngineException
1 parent b636623 commit 1ca9c70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

symengine/lib/pywrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ RCP<const Basic> load_basic(cereal::PortableBinaryInputArchive &ar, RCP<const Sy
294294
PyObject *pickle_bytes = PyBytes_FromStringAndSize(pickle_str.data(), pickle_str.size());
295295
PyObject *obj = PyObject_CallMethod(module, "loads", "O", pickle_bytes);
296296
if (obj == NULL) {
297-
throw SymEngineException("error when loading pickled symbol subclass object");
297+
throw SerializationError("error when loading pickled symbol subclass object");
298298
}
299299
RCP<const Basic> result = make_rcp<PySymbol>(name, obj);
300300
Py_XDECREF(pickle_bytes);
@@ -314,7 +314,7 @@ void save_basic(cereal::PortableBinaryOutputArchive &ar, const Symbol &b)
314314
PyObject *module = get_pickle_module();
315315
PyObject *pickle_bytes = PyObject_CallMethod(module, "dumps", "O", p->get_py_object());
316316
if (pickle_bytes == NULL) {
317-
throw SymEngineException("error when pickling symbol subclass object");
317+
throw SerializationError("error when pickling symbol subclass object");
318318
}
319319
Py_ssize_t size;
320320
char* buffer;

0 commit comments

Comments
 (0)