From 2feb420bb6fb376330acb7d8b83ef59933a496d6 Mon Sep 17 00:00:00 2001 From: Albert S Date: Sat, 6 Apr 2019 23:27:39 +0200 Subject: [PATCH] PdfProcessor: Exception instead of empty result when loading of document fails --- cli/pdfprocessor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/pdfprocessor.cpp b/cli/pdfprocessor.cpp index 1fd6f70..4d5f490 100644 --- a/cli/pdfprocessor.cpp +++ b/cli/pdfprocessor.cpp @@ -13,7 +13,7 @@ QVector PdfProcessor::process(const QByteArray &data) const QScopedPointer doc(Poppler::Document::loadFromData(data)); if(doc.isNull()) { - return { }; + throw QSSGeneralException("Failed to process pdf data"); } QRectF entirePage;