mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Improved Error reporting when Python passes are loaded
This commit is contained in:
		
							parent
							
								
									0774a500d4
								
							
						
					
					
						commit
						bbfb43006d
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -61,12 +61,14 @@ void load_plugin(std::string filename, std::vector<std::string> aliases)
 | 
			
		|||
			PyObject *filename_p = PyUnicode_FromString(filename.c_str());
 | 
			
		||||
			if(filename_p == NULL)
 | 
			
		||||
			{
 | 
			
		||||
				PyErr_Print();
 | 
			
		||||
				log_cmd_error("Issues converting `%s' to Python\n", filename.c_str());
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
			PyObject *module_p = PyImport_Import(filename_p);
 | 
			
		||||
			if(module_p == NULL)
 | 
			
		||||
			{
 | 
			
		||||
				PyErr_Print();
 | 
			
		||||
				log_cmd_error("Can't load python module `%s'\n", filename.c_str());
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue