comparison Python/pythonrun.c @ 1282:e0464e7115ca legacy-trunk

* pythonrun.c: Print exception type+arg *after* stack trace instead of before it. * ceval.c, object.c: moved testbool() to object.c (now extern visible) * stringobject.c: fix bugs in and rationalize string resize in formatstring() * tokenizer.[ch]: fix non-working code for lines longer than BUFSIZ
author Guido van Rossum <guido@python.org>
date Wed, 12 May 1993 08:24:20 +0000
parents 65a1e4e9cd54
children 4d292c7857d4
comparison
equal deleted inserted replaced
1281:c60cb059c481 1282:e0464e7115ca
243 sysset("last_value", v); 243 sysset("last_value", v);
244 f = sysget("stderr"); 244 f = sysget("stderr");
245 if (f == NULL) 245 if (f == NULL)
246 fprintf(stderr, "lost sys.stderr\n"); 246 fprintf(stderr, "lost sys.stderr\n");
247 else { 247 else {
248 printtraceback(f);
248 if (writeobject(exception, f, PRINT_RAW) != 0) 249 if (writeobject(exception, f, PRINT_RAW) != 0)
249 err_clear(); 250 err_clear();
250 if (v != NULL && v != None) { 251 if (v != NULL && v != None) {
251 writestring(": ", f); 252 writestring(": ", f);
252 if (writeobject(v, f, PRINT_RAW) != 0) 253 if (writeobject(v, f, PRINT_RAW) != 0)
253 err_clear(); 254 err_clear();
254 } 255 }
255 writestring("\n", f); 256 writestring("\n", f);
256 printtraceback(f);
257 } 257 }
258 XDECREF(exception); 258 XDECREF(exception);
259 XDECREF(v); 259 XDECREF(v);
260 } 260 }
261 261