Skip to content

Commit 0f99749

Browse files
author
Christopher Doris
committed
bugfix: errset not defined
1 parent 9a4659f commit 0f99749

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/cpython/jlwrap.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ function _pyjl_serialize(self::PyPtr, ::PyPtr)
204204
serialize(io, PyJuliaValue_GetValue(self))
205205
b = take!(io)
206206
return PyBytes_FromStringAndSize(pointer(b), sizeof(b))
207-
catch
208-
errset(POINTERS.PyExc_Exception, "error serializing this value")
207+
catch e
208+
PyErr_SetString(POINTERS.PyExc_Exception, "error serializing this value")
209209
return PyNULL
210210
end
211211
end
@@ -219,8 +219,8 @@ function _pyjl_deserialize(t::PyPtr, v::PyPtr)
219219
io = IOBuffer(unsafe_wrap(Array, Ptr{UInt8}(ptr[]), Int(len[])))
220220
x = deserialize(io)
221221
return PyJuliaValue_New(t, x)
222-
catch
223-
errset(POINTERS.PyExc_Exception, "error deserializing this value")
222+
catch e
223+
PyErr_SetString(POINTERS.PyExc_Exception, "error deserializing this value")
224224
return PyNULL
225225
end
226226
end

0 commit comments

Comments
 (0)