mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-24 09:16:43 +00:00
API change: use PandocError for exceptions in Lua subsystem
The PandocError type is used throughout the Lua subsystem, all Lua functions throw an exception of this type if an error occurs. The `LuaException` type is removed and no longer exported from `Text.Pandoc.Lua`. In its place, a new constructor `PandocLuaError` is added to PandocError.
This commit is contained in:
@@ -26,10 +26,9 @@ return {
|
||||
)
|
||||
end),
|
||||
test('non-version string is rejected', function ()
|
||||
assert.error_matches(
|
||||
function () Version '11friends' end,
|
||||
'11friends'
|
||||
)
|
||||
local success, msg = pcall(function () Version '11friends' end)
|
||||
assert.is_falsy(success)
|
||||
assert.is_truthy(tostring(msg):match('11friends'))
|
||||
end)
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user