Mercurial > cpython-lru_cache-weakref
comparison Python/pythonmain.c @ 690:891f98357c04 legacy-trunk
Set sys.last_{type,value} to characteristics of last unhandled exception.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 04 Mar 1992 16:39:39 +0000 |
| parents | 6d1599be2b54 |
| children | 76d92ebb4d82 |
comparison
equal
deleted
inserted
replaced
| 689:90ea50786095 | 690:891f98357c04 |
|---|---|
| 298 printobject(v, stderr, PRINT_RAW); | 298 printobject(v, stderr, PRINT_RAW); |
| 299 fprintf(stderr, "\n"); | 299 fprintf(stderr, "\n"); |
| 300 goaway(1); | 300 goaway(1); |
| 301 } | 301 } |
| 302 } | 302 } |
| 303 sysset("last_type", exception); | |
| 304 sysset("last_value", v); | |
| 303 if (printobject(exception, stderr, PRINT_RAW) != 0) | 305 if (printobject(exception, stderr, PRINT_RAW) != 0) |
| 304 err_clear(); | 306 err_clear(); |
| 305 if (v != NULL && v != None) { | 307 if (v != NULL && v != None) { |
| 306 fprintf(stderr, ": "); | 308 fprintf(stderr, ": "); |
| 307 if (printobject(v, stderr, PRINT_RAW) != 0) | 309 if (printobject(v, stderr, PRINT_RAW) != 0) |
