mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:12:45 +00:00 
			
		
		
		
	PixelPaint: Include possible errno description in error messages
In the case where an error is created from an errno, calling string_literal() will print nothing. Using Error's formatter instead gives a more descriptive error message.
This commit is contained in:
		
							parent
							
								
									3faf089be5
								
							
						
					
					
						commit
						5b84fafbca
					
				
					 2 changed files with 17 additions and 17 deletions
				
			
		|  | @ -126,7 +126,7 @@ void MoveTool::on_mouseup(Layer* layer, MouseEvent& event) | |||
|     if (m_scaling) { | ||||
|         auto scaled_layer_or_error = m_editor->active_layer()->scale(m_new_layer_rect, Gfx::Painter::ScalingMode::BilinearBlend); | ||||
|         if (scaled_layer_or_error.is_error()) | ||||
|             GUI::MessageBox::show_error(m_editor->window(), MUST(String::formatted("Failed to resize layer: {}", scaled_layer_or_error.error().string_literal()))); | ||||
|             GUI::MessageBox::show_error(m_editor->window(), MUST(String::formatted("Failed to resize layer: {}", scaled_layer_or_error.release_error()))); | ||||
|         else | ||||
|             m_editor->layers_did_change(); | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Ledbetter
						Tim Ledbetter