diff Python/traceback.c @ 285:85bd7dac13f3 legacy-trunk

printobject now returns an error code
author Guido van Rossum <guido@python.org>
date Fri, 07 Jun 1991 22:35:42 +0000
parents 853b736a6a9e
children 06774a94abb5
line wrap: on
line diff
--- a/Python/traceback.c	Fri Jun 07 16:10:43 1991 +0000
+++ b/Python/traceback.c	Fri Jun 07 22:35:42 1991 +0000
@@ -186,12 +186,14 @@
 	FILE *fp;
 {
 	while (tb != NULL) {
-		if (intrcheck()) {
-			fprintf(fp, "[interrupted]\n");
+		if (intrcheck())
+			break;
+		fprintf(fp, "  File \"");
+		if (printobject(tb->tb_frame->f_code->co_filename,
+				fp, PRINT_RAW) != 0) {
+			err_clear();
 			break;
 		}
-		fprintf(fp, "  File \"");
-		printobject(tb->tb_frame->f_code->co_filename, fp, PRINT_RAW);
 		fprintf(fp, "\", line %d\n", tb->tb_lineno);
 		tb_displayline(fp,
 		     getstringvalue(tb->tb_frame->f_code->co_filename),