-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
8eb62f2
commit fe67ef2
Showing
5 changed files
with
31 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters