From d392927511f3ae268ac082ef23475d7f13213598 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Fri, 29 Sep 2023 09:54:34 +0300 Subject: [PATCH] chore(classes): Return more informative error message when failing to finish class --- classes/base.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/base.lua b/classes/base.lua index 7cd902029..b06428202 100644 --- a/classes/base.lua +++ b/classes/base.lua @@ -575,8 +575,8 @@ function class:finish () end SILE.typesetter:runHooks("pageend") -- normally run by the typesetter self:endPage() - if SILE.typesetter then - assert(SILE.typesetter:isQueueEmpty(), "queues not empty") + if SILE.typesetter and not SILE.typesetter:isQueueEmpty() then + SU.error("Queues are not empty as expected after ending last page", true) end SILE.outputter:finish() self:runHooks("finish")