From d783a46d73d92e9a79ef123dc6b422568e1aad69 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 7 Jun 1991 22:35:42 +0000 Subject: printobject now returns an error code --- Python/traceback.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Python/traceback.c') diff --git a/Python/traceback.c b/Python/traceback.c index 0b6904f6b2..e71f6fa160 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -186,12 +186,14 @@ tb_printinternal(tb, fp) FILE *fp; { while (tb != NULL) { - if (intrcheck()) { - fprintf(fp, "[interrupted]\n"); + if (intrcheck()) break; - } fprintf(fp, " File \""); - printobject(tb->tb_frame->f_code->co_filename, fp, PRINT_RAW); + if (printobject(tb->tb_frame->f_code->co_filename, + fp, PRINT_RAW) != 0) { + err_clear(); + break; + } fprintf(fp, "\", line %d\n", tb->tb_lineno); tb_displayline(fp, getstringvalue(tb->tb_frame->f_code->co_filename), -- cgit v1.2.1