summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-03-04 16:39:39 (GMT)
committerGuido van Rossum <guido@python.org>1992-03-04 16:39:39 (GMT)
commitc4adc8337850796b3ca74fde4e594df5d39279f0 (patch)
tree1a08af285abd7458ebe82e9ca281403ba15303b6 /Python
parentfebd551bab28b3a90b838e4782726d9fb3a587c7 (diff)
downloadcpython-c4adc8337850796b3ca74fde4e594df5d39279f0.zip
cpython-c4adc8337850796b3ca74fde4e594df5d39279f0.tar.gz
cpython-c4adc8337850796b3ca74fde4e594df5d39279f0.tar.bz2
Set sys.last_{type,value} to characteristics of last unhandled exception.
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonmain.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/pythonmain.c b/Python/pythonmain.c
index f7ff36c..b00a270 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) {