Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add traceback information to exception #545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 14, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Increase ref-count as documented for PyErr_Restore
  • Loading branch information
filmor committed Nov 14, 2018
commit d80a8b93129e9d732b89959af85467623f537492
3 changes: 3 additions & 0 deletions src/runtime/exceptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ public static void SetError(Exception e)
var pe = e as PythonException;
if (pe != null)
{
Runtime.XIncref(pe.PyType);
Runtime.XIncref(pe.PyValue);
Runtime.XIncref(pe.PyTB);
Runtime.PyErr_Restore(pe.PyType, pe.PyValue, pe.PyTB);
return;
}
Expand Down