diff options
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Lua.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Lua.hs b/src/Text/Pandoc/Lua.hs index 2e4204898..583d43a2e 100644 --- a/src/Text/Pandoc/Lua.hs +++ b/src/Text/Pandoc/Lua.hs @@ -196,9 +196,8 @@ runFilterFunction lf x = do push x z <- Lua.pcall 1 1 Nothing when (z /= OK) $ do - msg <- Lua.peek (-1) <* Lua.pop 1 - let prefix = "Error while running filter function: " - Lua.throwLuaError $ prefix ++ msg + let addPrefix = ("Error while running filter function: " ++) + Lua.throwTopMessageAsError' addPrefix elementOrList :: FromLuaStack a => a -> Lua [a] elementOrList x = do |