mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	#17413: make sure settrace funcs get passed exception instances for 'value'.
Patch by Ingrid Cheung and Brendan McLoughlin.
This commit is contained in:
		
							parent
							
								
									0aa685a33c
								
							
						
					
					
						commit
						3583761bcd
					
				
					 4 changed files with 30 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -3712,6 +3712,7 @@ call_exc_trace(Py_tracefunc func, PyObject *self, PyFrameObject *f)
 | 
			
		|||
        value = Py_None;
 | 
			
		||||
        Py_INCREF(value);
 | 
			
		||||
    }
 | 
			
		||||
    PyErr_NormalizeException(&type, &value, &traceback);
 | 
			
		||||
    arg = PyTuple_Pack(3, type, value, traceback);
 | 
			
		||||
    if (arg == NULL) {
 | 
			
		||||
        PyErr_Restore(type, value, traceback);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue