printobject now returns an error code

This commit is contained in:
Guido van Rossum 1991-06-07 22:35:42 +00:00
parent 909336104b
commit d783a46d73
4 changed files with 14 additions and 9 deletions

View file

@ -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);