More informative JSON parse error.

Closes #5973.
This commit is contained in:
John MacFarlane 2019-12-09 07:25:37 -08:00
parent 0bfe478a69
commit a6297d252e

View file

@ -165,4 +165,4 @@ readJSON :: PandocMonad m
readJSON _ t =
case eitherDecode' . BL.fromStrict . UTF8.fromText $ t of
Right doc -> return doc
Left _ -> throwError $ PandocParseError "JSON parse error"
Left e -> throwError $ PandocParseError ("JSON parse error: " <> T.pack e)