aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Lua/Marshaling/Version.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-04-17 18:02:25 -0700
committerGitHub <noreply@github.com>2020-04-17 18:02:25 -0700
commit0d2b8e3fe1d6a27aac082be7711b7156783b3051 (patch)
tree459122371d6b88a7756eee954b81f2bba4bdfdca /src/Text/Pandoc/Lua/Marshaling/Version.hs
parent8f40b4ba14fce10199a059a281c9bd10c884241d (diff)
parent62cf21cbaa9ac3fbc2ba7218a3037208364c80a4 (diff)
downloadpandoc-0d2b8e3fe1d6a27aac082be7711b7156783b3051.tar.gz
Merge pull request #6211 from tarleb/lua-pandocerror
API change: create PandocLua type, use PandocError for exceptions
Diffstat (limited to 'src/Text/Pandoc/Lua/Marshaling/Version.hs')
-rw-r--r--src/Text/Pandoc/Lua/Marshaling/Version.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Lua/Marshaling/Version.hs b/src/Text/Pandoc/Lua/Marshaling/Version.hs
index 090725afc..9adb1b763 100644
--- a/src/Text/Pandoc/Lua/Marshaling/Version.hs
+++ b/src/Text/Pandoc/Lua/Marshaling/Version.hs
@@ -57,7 +57,7 @@ peekVersion idx = Lua.ltype idx >>= \case
let parses = readP_to_S parseVersion versionStr
case lastMay parses of
Just (v, "") -> return v
- _ -> Lua.throwException $ "could not parse as Version: " ++ versionStr
+ _ -> Lua.throwMessage $ "could not parse as Version: " ++ versionStr
Lua.TypeUserdata ->
reportValueOnFailure versionTypeName
@@ -71,7 +71,7 @@ peekVersion idx = Lua.ltype idx >>= \case
makeVersion <$> Lua.peek idx
_ ->
- Lua.throwException "could not peek Version"
+ Lua.throwMessage "could not peek Version"
instance Peekable Version where
peek = peekVersion