{-# LANGUAGE ExistentialQuantification #-}
module Dormouse.Url.Exception
( UrlException(..)
) where
import Control.Exception.Safe (Exception(..))
import qualified Data.Text as T
newtype UrlException = UrlException { UrlException -> Text
urlExceptionMessage :: T.Text }
instance Show UrlException where
show :: UrlException -> String
show UrlException { urlExceptionMessage :: UrlException -> Text
urlExceptionMessage = Text
msg } = String
"Failed to parse url: " String -> ShowS
forall a. Semigroup a => a -> a -> a
<> Text -> String
T.unpack Text
msg
instance Exception UrlException