You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make Julia exceptions wrapped in Python Exceptions more informative (#608)
* Make Julia exceptions wrapped in Python Exceptions more informative
I have added a backtrace to the description of exceptions coming from Julia
that are wrapped in Python exceptions.
This makes it much easier to find the source of errors in Julia code being
called from Python functions.
* Allow `pyraise` to include backtrace from Julia
Instead of using `catch_backtrace` in `showerror_string`, which may not always
be called from a catch block with a current exception set, I have added an
optional argument to `pyraise` which can be used to pass backtraces to
`showerror_string`.
Backtraces are only used if exception is not a PyError exception. By default, no
backtrace is shown.
All try-catch blocks in PyCall attempt to pass the backtrace for the current
exception to `pyraise`.
* Add pyraise macro
Added a pyraise macro, as written by @stevengj, which catches backtraces and
calls the pyraise function. This macro should only be used in a catch block.
* Allow ioraise to display Julia backtrace
0 commit comments