@@ -134,12 +134,16 @@ defaultShouldDisplayException se
134134
135135-- | Printing an exception to standard error
136136-- if `defaultShouldDisplayException` returns `True`.
137+--
138+-- Since: 3.1.0
137139defaultOnException :: Maybe Request -> SomeException -> IO ()
138140defaultOnException _ e =
139141 when (defaultShouldDisplayException e)
140142 $ TIO.hPutStrLn stderr $ T.pack $ show e
141143
142144-- | Sending 400 for bad requests. Sending 500 for internal server errors.
145+--
146+-- Since: 3.1.0
143147defaultOnExceptionResponse :: SomeException -> Response
144148defaultOnExceptionResponse e
145149 | Just (_ :: InvalidRequest) <- fromException e = responseLBS H.badRequest400 [(H.hContentType, "text/plain; charset=utf-8")] "Bad Request"
@@ -147,6 +151,8 @@ defaultOnExceptionResponse e
147151
148152-- | Exception handler for the debugging purpose.
149153-- 500, text/plain, a showed exception.
154+--
155+-- Since: 2.0.3.2
150156exceptionResponseForDebug :: SomeException -> Response
151157exceptionResponseForDebug e = responseLBS H.internalServerError500 [(H.hContentType, "text/plain; charset=utf-8")] (TLE.encodeUtf8 $ TL.pack $ "Exception: " ++ show e)
152158