mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
printobject now returns an error code
This commit is contained in:
parent
909336104b
commit
d783a46d73
4 changed files with 14 additions and 9 deletions
|
@ -289,10 +289,12 @@ print_error()
|
|||
object *exception, *v;
|
||||
err_get(&exception, &v);
|
||||
fprintf(stderr, "Unhandled exception: ");
|
||||
printobject(exception, stderr, PRINT_RAW);
|
||||
if (printobject(exception, stderr, PRINT_RAW) != 0)
|
||||
err_clear();
|
||||
if (v != NULL && v != None) {
|
||||
fprintf(stderr, ": ");
|
||||
printobject(v, stderr, PRINT_RAW);
|
||||
if (printobject(v, stderr, PRINT_RAW) != 0)
|
||||
err_clear();
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
XDECREF(exception);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue