File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -205,10 +205,12 @@ function _pyjl_serialize(self::PyPtr, ::PyPtr)
205
205
b = take! (io)
206
206
return PyBytes_FromStringAndSize (pointer (b), sizeof (b))
207
207
catch e
208
- PyErr_SetString (
209
- POINTERS. PyExc_Exception,
210
- " error serializing this value. Caught exception $(sprint (showerror, e, catch_backtrace ())) "
211
- )
208
+ PyErr_SetString (POINTERS. PyExc_Exception, " error serializing this value." )
209
+ # wrap sprint in another try-catch block to prevent this function from throwing
210
+ try
211
+ @debug " Caught exception $(sprint (showerror, e, catch_backtrace ())) "
212
+ catch
213
+ end
212
214
return PyNULL
213
215
end
214
216
end
@@ -223,10 +225,12 @@ function _pyjl_deserialize(t::PyPtr, v::PyPtr)
223
225
x = deserialize (io)
224
226
return PyJuliaValue_New (t, x)
225
227
catch e
226
- PyErr_SetString (
227
- POINTERS. PyExc_Exception,
228
- " error deserializing this value. Caught exception $(sprint (showerror, e, catch_backtrace ())) "
229
- )
228
+ PyErr_SetString (POINTERS. PyExc_Exception, " error deserializing this value." )
229
+ # wrap sprint in another try-catch block to prevent this function from throwing
230
+ try
231
+ @debug " Caught exception $(sprint (showerror, e, catch_backtrace ())) "
232
+ catch
233
+ end
230
234
return PyNULL
231
235
end
232
236
end
You can’t perform that action at this time.
0 commit comments