Skip to content

Commit e6d529d

Browse files
author
Christopher Doris
committed
ensure functions don't throw
1 parent 7af2b30 commit e6d529d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/cpython/jlwrap.jl

Lines changed: 2 additions & 4 deletions
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)