1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

PDFViewer: Simplify user-facing error messages

We now show a simple, if less helpful, message to the user and print
the verbose error message to serial instead.
This commit is contained in:
Julian Offenhäuser 2022-11-10 22:42:44 +01:00 committed by Andreas Kling
parent e782d03f96
commit 9b1331a984
2 changed files with 4 additions and 2 deletions

View file

@ -89,7 +89,8 @@ void PDFViewer::paint_event(GUI::PaintEvent& event)
return;
auto handle_error = [&](PDF::Error& error) {
GUI::MessageBox::show_error(nullptr, String::formatted("Failed to render page:\n{}", error.message()));
warnln("{}", error.message());
GUI::MessageBox::show_error(nullptr, "Failed to render the page."sv);
m_document.clear();
};