diff options
Diffstat (limited to 'pandoc-lua-engine')
| -rw-r--r-- | pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/PandocError.hs | 8 | ||||
| -rw-r--r-- | pandoc-lua-engine/test/lua/module/pandoc-template.lua | 2 |
2 files changed, 5 insertions, 5 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 7f83f2fc0..7feba2d45 100644 --- a/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/PandocError.hs +++ b/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/PandocError.hs @@ -19,9 +19,9 @@ module Text.Pandoc.Lua.Marshal.PandocError ) where -import HsLua (LuaError, Peeker, Pusher, liftLua, pushString) +import HsLua (LuaError, Peeker, Pusher, liftLua, pushText) import HsLua.Packaging -import Text.Pandoc.Error (PandocError (PandocLuaError)) +import Text.Pandoc.Error (PandocError (PandocLuaError), renderError) import qualified HsLua as Lua import qualified Text.Pandoc.UTF8 as UTF8 @@ -30,9 +30,9 @@ import qualified Text.Pandoc.UTF8 as UTF8 typePandocError :: LuaError e => DocumentedType e PandocError typePandocError = deftype "PandocError" [ operation Tostring $ defun "__tostring" - ### liftPure (show @PandocError) + ### liftPure renderError <#> udparam typePandocError "obj" "PandocError object" - =#> functionResult pushString "string" "string representation of error." + =#> functionResult pushText "string" "string representation of error." ] mempty -- no members diff --git a/pandoc-lua-engine/test/lua/module/pandoc-template.lua b/pandoc-lua-engine/test/lua/module/pandoc-template.lua index c288b2016..638b31f09 100644 --- a/pandoc-lua-engine/test/lua/module/pandoc-template.lua +++ b/pandoc-lua-engine/test/lua/module/pandoc-template.lua @@ -50,7 +50,7 @@ return { test('fails if template has non-existing partial', function () assert.error_matches( function () return template.compile('${ nosuchpartial() }') end, - 'PandocCouldNotFindDataFileError' + 'Could not find data file templates/nosuchpartial' ) end), test('works with default template that uses partials', function () |
