From a6297d252e0142d3da868fdf35206bba9fbedc4f Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 9 Dec 2019 07:25:37 -0800 Subject: More informative JSON parse error. Closes #5973. --- src/Text/Pandoc/Readers.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Readers.hs b/src/Text/Pandoc/Readers.hs index 461f7f4d9..36a0e6daa 100644 --- a/src/Text/Pandoc/Readers.hs +++ b/src/Text/Pandoc/Readers.hs @@ -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) -- cgit v1.2.3