mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	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!).
This commit is contained in:
		
							parent
							
								
									c1f088201f
								
							
						
					
					
						commit
						eaedc7ce32
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -1795,6 +1795,8 @@ eval_code2(co, globals, locals, | |||
| 					   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 @@ set_exc_info(tstate, type, value, tb) | |||
| 	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 */ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Barry Warsaw
						Barry Warsaw