aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2025-12-31 17:28:29 -0500
committerJohn MacFarlane <[email protected]>2026-01-19 20:55:05 +0100
commit49aa337c1dfe09111ebdde16aebd8f106a7e152e (patch)
tree05effb6c30cab0de3a2945dc6163a622d846a2e9
parentf2c7a9c0cf06682144bec81fdb1ecda6df1d2a20 (diff)
T.P.Error: define displayException for PandocError.
This is a behavior change, not an API change, since there was already a definition that defaulted to using Show. The change here is that we use renderError for a more human-readable version.
-rw-r--r--src/Text/Pandoc/Error.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Error.hs b/src/Text/Pandoc/Error.hs
index b52573177..22f613c1e 100644
--- a/src/Text/Pandoc/Error.hs
+++ b/src/Text/Pandoc/Error.hs
@@ -68,6 +68,8 @@ data PandocError = PandocIOError Text IOError
deriving (Show, Typeable, Generic)
instance Exception PandocError
+ where
+ displayException = T.unpack . renderError
renderError :: PandocError -> Text
renderError e =