diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-12-09 07:25:37 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-12-09 07:25:37 -0800 |
commit | a6297d252e0142d3da868fdf35206bba9fbedc4f (patch) | |
tree | dd6f661e0a2c6c8bb005adb68d74d1faed8747f3 | |
parent | 0bfe478a693451500528fc05c1e5f48f3ca1a55b (diff) | |
download | pandoc-a6297d252e0142d3da868fdf35206bba9fbedc4f.tar.gz |
More informative JSON parse error.
Closes #5973.
-rw-r--r-- | src/Text/Pandoc/Readers.hs | 2 |
1 files changed, 1 insertions, 1 deletions
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) |