mirror of
				https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
				synced 2025-10-31 10:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			11 lines
		
	
	
		
			229 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			229 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import sys
 | |
| import traceback
 | |
| 
 | |
| 
 | |
| def run(code, task):
 | |
|     try:
 | |
|         code()
 | |
|     except Exception as e:
 | |
|         print(f"{task}: {type(e).__name__}", file=sys.stderr)
 | |
|         print(traceback.format_exc(), file=sys.stderr)
 | 
