on master help sign in
runOnException -> runEx
43c5821Michael Snoyman
Network/Wai/Handler/Warp.hs+4−4
@@ -25,7 +25,7 @@
25module Network.Wai.Handler.Warp
25module Network.Wai.Handler.Warp
26 ( -- * Run a Warp server
26 ( -- * Run a Warp server
27 run
27 run
28− , runOnException
28+ , runEx
29 , runInteractive
29 , runInteractive
30 , serveConnections
30 , serveConnections
31 -- * Datatypes
31 -- * Datatypes
@@ -85,12 +85,12 @@ import Control.Monad (forever)
85
85
86-- | Run an 'Application' on the given port, ignoring all exceptions.
86-- | Run an 'Application' on the given port, ignoring all exceptions.
87run :: Port -> Application -> IO ()
87run :: Port -> Application -> IO ()
88−run = runOnException (const $ return ())
88+run = runEx (const $ return ())
89
89
90-- | Run an 'Application' on the given port, with the given exception handler.
90-- | Run an 'Application' on the given port, with the given exception handler.
91-- Please note that you will also receive 'InvalidRequest' exceptions.
91-- Please note that you will also receive 'InvalidRequest' exceptions.
92−runOnException :: (SomeException -> IO ()) -> Port -> Application -> IO ()
92+runEx :: (SomeException -> IO ()) -> Port -> Application -> IO ()
93−runOnException onE port = withSocketsDo . -- FIXME should this be called by client user instead?
93+runEx onE port = withSocketsDo . -- FIXME should this be called by client user instead?
94 bracket
94 bracket
95 (listenOn $ PortNumber $ fromIntegral port)
95 (listenOn $ PortNumber $ fromIntegral port)
96 sClose .
96 sClose .