From 2a70ea3ee74bda21528313bc5dff30a293efe583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Offenh=C3=A4user?= Date: Mon, 9 Jan 2023 18:36:01 +0100 Subject: [PATCH] LibPDF: Propagate errors in PDFFont::create() --- Userland/Libraries/LibPDF/Fonts/PDFFont.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibPDF/Fonts/PDFFont.cpp b/Userland/Libraries/LibPDF/Fonts/PDFFont.cpp index a2db01050f..ab05e95904 100644 --- a/Userland/Libraries/LibPDF/Fonts/PDFFont.cpp +++ b/Userland/Libraries/LibPDF/Fonts/PDFFont.cpp @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ +#include #include #include #include @@ -83,8 +84,7 @@ PDFErrorOr> PDFFont::create(Document* document, NonnullRe if (subtype == "TrueType") return TRY(TrueTypeFont::create(document, dict, font_size)); - dbgln("Unknown font subtype: {}", subtype); - TODO(); + return Error(Error::Type::Internal, TRY(String::formatted("Unhandled font subtype: {}", subtype)).to_deprecated_string()); } Tuple PDFFont::replacement_for_standard_latin_font(StringView name)