diff options
author | Profpatsch <mail@profpatsch.de> | 2024-07-29T09·11+0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2024-07-30T12·41+0000 |
commit | 1f65a7b0d033fc8a1bc3d8315e34494035ae8128 (patch) | |
tree | e7544690a6793110598422bd8585260c330ce4cd /users/Profpatsch/whatcd-resolver/src | |
parent | 8aa038a90e057e978c68998692857d95eb89459c (diff) |
fix(users/Profpatsch/whatcd-resolver): better show ApplicationError r/8426
Change-Id: I7a1087afc4000299529a7518f273bfee8d651c72 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12054 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
Diffstat (limited to 'users/Profpatsch/whatcd-resolver/src')
-rw-r--r-- | users/Profpatsch/whatcd-resolver/src/AppT.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/users/Profpatsch/whatcd-resolver/src/AppT.hs b/users/Profpatsch/whatcd-resolver/src/AppT.hs index 32320041227b..0c93cbaddb3a 100644 --- a/users/Profpatsch/whatcd-resolver/src/AppT.hs +++ b/users/Profpatsch/whatcd-resolver/src/AppT.hs @@ -33,10 +33,12 @@ data Context = Context newtype AppT m a = AppT {unAppT :: ReaderT Context m a} deriving newtype (Functor, Applicative, Monad, MonadIO, MonadUnliftIO, MonadThrow) -data AppException = AppException Text - deriving stock (Show) +newtype AppException = AppException Text deriving anyclass (Exception) +instance Show AppException where + showsPrec _ (AppException t) = ("AppException: "++) . (textToString t++) + -- * Logging & Opentelemetry instance (MonadIO m) => MonadLogger (AppT m) where |