git.iko.soy/typeable/pandoc
on master help sign in
More informative JSON parse error.

Closes #5973.

commita6297d252e0142d3da868fdf35206bba9fbedc4f authorJohn MacFarlane <jgm@berkeley.edu> dateMon 9 Dec 2019, 07:25 (7 years ago) parent0bfe478
1 file changed+1−1
src/Text/Pandoc/Readers.hs+1−1
src/Text/Pandoc/Readers.hs+1−1
@@ -165,4 +165,4 @@ readJSON :: PandocMonad m
165165readJSON _ t =
166166 case eitherDecode' . BL.fromStrict . UTF8.fromText $ t of
167167 Right doc -> return doc
168− Left _ -> throwError $ PandocParseError "JSON parse error"
168+ Left e -> throwError $ PandocParseError ("JSON parse error: " <> T.pack e)