@@ -138,9 +138,18 @@ setOnException :: (Maybe Request -> SomeException -> IO ()) -> Settings -> Setti
138138setOnException x y = y { settingsOnException = x }
139139
140140-- | A function to create a `Response` when an exception occurs.
141−--
142141-- Default: 'defaultOnExceptionResponse'
143142--
143+-- Note that an application can handle its own exceptions without interfering with Warp:
144+--
145+-- > myApp :: Application
146+-- > myApp request respond = innerApp `catch` onError
147+-- > where
148+-- > onError = respond . response500 request
149+-- >
150+-- > response500 :: Request -> SomeException -> Response
151+-- > response500 req someEx = responseLBS status500 -- ...
152+--
144153-- Since 2.1.0
145154setOnExceptionResponse :: (SomeException -> Response) -> Settings -> Settings
146155setOnExceptionResponse x y = y { settingsOnExceptionResponse = x }