Skip to content

Commit a3b9095

Browse files
authored
ensure functions don't throw (#344)
Co-authored-by: Christopher Doris <github.com/cjdoris>
1 parent 7af2b30 commit a3b9095

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/cpython/jlwrap.jl

+2-4
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ function _pyjl_serialize(self::PyPtr, ::PyPtr)
209209
# wrap sprint in another try-catch block to prevent this function from throwing
210210
try
211211
@debug "Caught exception $(sprint(showerror, e, catch_backtrace()))"
212-
catch e2
213-
@debug "Error printing exception: $e2"
212+
catch
214213
end
215214
return PyNULL
216215
end
@@ -230,8 +229,7 @@ function _pyjl_deserialize(t::PyPtr, v::PyPtr)
230229
# wrap sprint in another try-catch block to prevent this function from throwing
231230
try
232231
@debug "Caught exception $(sprint(showerror, e, catch_backtrace()))"
233-
catch e2
234-
@debug "Error printing exception: $e2"
232+
catch
235233
end
236234
return PyNULL
237235
end

0 commit comments

Comments
 (0)