From 1f65a7b0d033fc8a1bc3d8315e34494035ae8128 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 29 Jul 2024 11:11:39 +0200 Subject: fix(users/Profpatsch/whatcd-resolver): better show ApplicationError Change-Id: I7a1087afc4000299529a7518f273bfee8d651c72 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12054 Reviewed-by: Profpatsch Tested-by: BuildkiteCI --- users/Profpatsch/whatcd-resolver/src/AppT.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'users') 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 -- cgit 1.4.1