summaryrefslogtreecommitdiff
path: root/Python/pythonmain.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-03-04 16:39:39 +0000
committerGuido van Rossum <guido@python.org>1992-03-04 16:39:39 +0000
commit0606e0e2791c13f17402c84c279f69c516437fda (patch)
tree1a08af285abd7458ebe82e9ca281403ba15303b6 /Python/pythonmain.c
parent353a6e1aa7df680c9ea9cf16c36f5d61945ef630 (diff)
downloadcpython-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.c2
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) {