Add displayException to errMessage for AssistantError wrapping (#18465)

This commit is contained in:
dylant-da 2024-02-22 16:01:06 +00:00 committed by GitHub
parent 3d2f8650b1
commit 1525ef84b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,8 +34,8 @@ wrapErrG wrapSomeException ctx m = m `catches`
addErrorContext err =
err { errContext = errContext err <|> Just ctx }
wrapErr :: Text -> IO a -> IO a
wrapErr = wrapErrG wrapSomeExceptionWithoutMsg
wrapErrNoDisplay :: Text -> IO a -> IO a
wrapErrNoDisplay = wrapErrG wrapSomeExceptionWithoutMsg
wrapSomeExceptionWithoutMsg :: Text -> SomeException -> AssistantError
wrapSomeExceptionWithoutMsg ctx err =
@ -45,8 +45,8 @@ wrapSomeExceptionWithoutMsg ctx err =
, errInternal = Just (pack (show err))
}
wrapErrDisplay :: Text -> IO a -> IO a
wrapErrDisplay = wrapErrG wrapSomeExceptionWithMsg
wrapErr :: Text -> IO a -> IO a
wrapErr = wrapErrG wrapSomeExceptionWithMsg
wrapSomeExceptionWithMsg :: Text -> SomeException -> AssistantError
wrapSomeExceptionWithMsg ctx err =