Name
PyErr_Print
Synopsis
void PyErr_Print( )
Call only when an error is pending, or the whole program might crash.
Outputs a standard traceback to sys.stderr
, then
clears the error indicator.
If you need to process errors in highly sophisticated ways, study
other error-related functions of the C API, such as
PyErr_Fetch
, PyErr_Normalize
,
PyErr_GivenExceptionMatches
, and
PyErr_Restore
. However, I do not cover such
advanced and rarely needed possibilities in this book.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.