summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Applications/PDFViewer/PDFViewer.cpp3
-rw-r--r--Userland/Applications/PDFViewer/PDFViewerWidget.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/Userland/Applications/PDFViewer/PDFViewer.cpp b/Userland/Applications/PDFViewer/PDFViewer.cpp
index f69383a7cf..7c790d8def 100644
--- a/Userland/Applications/PDFViewer/PDFViewer.cpp
+++ b/Userland/Applications/PDFViewer/PDFViewer.cpp
@@ -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();
};
diff --git a/Userland/Applications/PDFViewer/PDFViewerWidget.cpp b/Userland/Applications/PDFViewer/PDFViewerWidget.cpp
index 9e8792058e..bfcce0df06 100644
--- a/Userland/Applications/PDFViewer/PDFViewerWidget.cpp
+++ b/Userland/Applications/PDFViewer/PDFViewerWidget.cpp
@@ -176,7 +176,8 @@ void PDFViewerWidget::open_file(Core::File& file)
auto handle_error = [&]<typename T>(PDF::PDFErrorOr<T> maybe_error) {
if (maybe_error.is_error()) {
auto error = maybe_error.release_error();
- GUI::MessageBox::show_error(nullptr, String::formatted("Couldn't load PDF {}:\n{}", file.filename(), error.message()));
+ warnln("{}", error.message());
+ GUI::MessageBox::show_error(nullptr, "Failed to load the document."sv);
return true;
}
return false;