From bf9e7305663612c30ef047fb5a2ecb392f25523c Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Tue, 6 Jun 2023 20:37:54 -0400 Subject: [PATCH] WebP: Log error if there is one Else, WebP files with a broken header just return "Decoding failed" without any more details. This way, there's some debug logging with more details. Maybe we'll want to remove this again since it might lead to duplicate error messages for files that have their error not in the header. We'll see how this feels. (But most files don't have any errors, so it's probably fine.) --- Userland/Libraries/LibGfx/ImageFormats/WebPLoader.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibGfx/ImageFormats/WebPLoader.cpp b/Userland/Libraries/LibGfx/ImageFormats/WebPLoader.cpp index 34aae26a83..ad452e69b0 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/WebPLoader.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/WebPLoader.cpp @@ -630,6 +630,7 @@ WebPImageDecoderPlugin::~WebPImageDecoderPlugin() = default; bool WebPImageDecoderPlugin::set_error(ErrorOr const& error_or) { if (error_or.is_error()) { + dbgln("WebPLoadingContext error: {}", error_or.error()); m_context->state = WebPLoadingContext::State::Error; return true; }