*Data.Aeson> :m +Control.Exception
*Data.Aeson Control.Exception> :set -XOverloadedStrings
*Data.Aeson Control.Exception> throwIO (AesonException "wrong")
*** Exception: aeson: wrong
HasCallStack backtrace:
throwIO, called at <interactive>:3:1 in interactive:Ghci1
*Data.Aeson Control.Exception> throwDecode "nll" :: IO Int
*** Exception: aeson: Unexpected "nll", expecting JSON value
HasCallStack backtrace:
throwIO, called at libraries/exceptions/src/Control/Monad/Catch.hs:343:12 in exceptions-0.10.11-97e4:Control.Monad.Catch
throwM, called at src/Data/Aeson/Decoding.hs:89:61 in aeson-2.3.1.0-inplace:Data.Aeson.Decoding
though
throwMdoes.So the backtraces collected by exceptions end somewhere inside
aesonlibrary, not including the call-site ofthrowDecode: