Bitmap: Supply image filename on loading error
This commit is contained in:
		
							parent
							
								
									8ed6de22a4
								
							
						
					
					
						commit
						19dc83a5d5
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -212,7 +212,8 @@ Bitmap::Bitmap(const char *filename)
 | 
			
		|||
	SDL_Surface *imgSurf = IMG_LoadTyped_RW(&ops, 1, extension);
 | 
			
		||||
 | 
			
		||||
	if (!imgSurf)
 | 
			
		||||
		throw Exception(Exception::SDLError, "SDL: %s", SDL_GetError());
 | 
			
		||||
		throw Exception(Exception::SDLError, "Error loading image '%s': %s",
 | 
			
		||||
		                filename, SDL_GetError());
 | 
			
		||||
 | 
			
		||||
	p->ensureFormat(imgSurf, SDL_PIXELFORMAT_ABGR8888);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue