Please sign in to comment.
general: Don't abuse PyErr_Restore
The intended purpose of this function is to restore an exception that has already been raised and saved with PyErr_Fetch. It should not be used to raise new exceptions nor should it be used to clear the current exception. The especially egregious example is `PyErr_Restore(exc_type, nullptr, nullptr);` as the null value may not be handled correctly.
- Loading branch information
Showing with 14 additions and 27 deletions.