PyAPI: support retrieving the exception when running a string
- Optionally get the error as a single line. - Support access the error as an allocated string. - PyC_ExceptionBuffer_Simple was always printing to the `stdout` while PyC_ExceptionBuffer didn't, now either print to the output. Without this, callers are unable to do anything with the error string.
This commit is contained in:
@@ -733,7 +733,6 @@ PyObject *PyC_ExceptionBuffer_Simple(void)
|
||||
|
||||
PyErr_Restore(error_type, error_value, error_traceback);
|
||||
|
||||
PyErr_Print();
|
||||
PyErr_Clear();
|
||||
return string_io_buf;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user