diff Python/ceval.c @ 6185:32aacd753f34 legacy-trunk

eval_code2(), set_exc_info(): Call PyErr_NormalizeException() the former rather than the latter, since PyErr_NormalizeException takes PyObject** and I didn't want to change the interface for set_exc_info (but I did want the changes propagated to eval_code2!).
author Barry Warsaw <barry@python.org>
date Thu, 28 Aug 1997 22:36:40 +0000
parents 79592761b331
children 77f5b6cbea66
line wrap: on
line diff
--- a/Python/ceval.c	Thu Aug 28 21:21:22 1997 +0000
+++ b/Python/ceval.c	Thu Aug 28 22:36:40 1997 +0000
@@ -1795,6 +1795,8 @@
 					   Python main loop.  Don't do
 					   this for 'finally'. */
 					if (b->b_type == SETUP_EXCEPT) {
+						PyErr_NormalizeException(
+							&exc, &val, &tb);
 						set_exc_info(tstate,
 							     exc, val, tb);
 					}
@@ -1875,8 +1877,6 @@
 	PyFrameObject *frame;
 	PyObject *tmp_type, *tmp_value, *tmp_tb;
 
-	PyErr_NormalizeException(&type, &value, &tb);
-
 	frame = tstate->frame;
 	if (frame->f_exc_type == NULL) {
 		/* This frame didn't catch an exception before */