summaryrefslogtreecommitdiff
path: root/Userland/Applications/PixelPaint/Tools/MoveTool.cpp
diff options
context:
space:
mode:
authorTim Ledbetter <timledbetter@gmail.com>2023-02-24 05:54:41 +0000
committerJelle Raaijmakers <jelle@gmta.nl>2023-03-26 00:47:29 +0100
commit5b84fafbca27fbf968c19e7af1c87ae8fd49d045 (patch)
tree18770eae02a4e4c89f19486bb897d0901921334e /Userland/Applications/PixelPaint/Tools/MoveTool.cpp
parent3faf089be5bf7be47b92990b0b9d04599c115845 (diff)
downloadserenity-5b84fafbca27fbf968c19e7af1c87ae8fd49d045.zip
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.
Diffstat (limited to 'Userland/Applications/PixelPaint/Tools/MoveTool.cpp')
-rw-r--r--Userland/Applications/PixelPaint/Tools/MoveTool.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Applications/PixelPaint/Tools/MoveTool.cpp b/Userland/Applications/PixelPaint/Tools/MoveTool.cpp
index ba3fe4960d..e473c95c39 100644
--- a/Userland/Applications/PixelPaint/Tools/MoveTool.cpp
+++ b/Userland/Applications/PixelPaint/Tools/MoveTool.cpp
@@ -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();
}