diff options
author | Guido van Rossum <guido@python.org> | 1992-03-04 16:39:39 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-03-04 16:39:39 +0000 |
commit | 0606e0e2791c13f17402c84c279f69c516437fda (patch) | |
tree | 1a08af285abd7458ebe82e9ca281403ba15303b6 /Python/pythonmain.c | |
parent | 353a6e1aa7df680c9ea9cf16c36f5d61945ef630 (diff) | |
download | cpython-0606e0e2791c13f17402c84c279f69c516437fda.tar.gz |
Set sys.last_{type,value} to characteristics of last unhandled exception.
Diffstat (limited to 'Python/pythonmain.c')
-rw-r--r-- | Python/pythonmain.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/pythonmain.c b/Python/pythonmain.c index f7ff36ccf9..b00a270054 100644 --- a/Python/pythonmain.c +++ b/Python/pythonmain.c @@ -300,6 +300,8 @@ print_error() goaway(1); } } + sysset("last_type", exception); + sysset("last_value", v); if (printobject(exception, stderr, PRINT_RAW) != 0) err_clear(); if (v != NULL && v != None) { |