diff options
Diffstat (limited to 'pandoc-lua-engine/src')
| -rw-r--r-- | pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/PandocError.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/PandocError.hs b/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/PandocError.hs index 0e0e00dbd..c9721a53d 100644 --- a/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/PandocError.hs +++ b/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/PandocError.hs @@ -30,7 +30,9 @@ import qualified Text.Pandoc.UTF8 as UTF8 typePandocError :: LuaError e => DocumentedType e PandocError typePandocError = deftype "PandocError" [ operation Tostring $ defun "__tostring" - ### liftPure renderError + ### liftPure (\case + PandocLuaError e -> e + err -> renderError err) <#> udparam typePandocError "obj" "PandocError object" =#> functionResult pushText "string" "string representation of error." ] |
