mirror of
https://github.com/snoyberg/keter.git
synced 2024-12-14 17:12:46 +03:00
Catch exceptions during reload #64
This commit is contained in:
parent
b281850a74
commit
308deed377
@ -1,3 +1,7 @@
|
||||
## 1.3.7.1
|
||||
|
||||
Bug fix: catch exceptions during reload [#64](https://github.com/snoyberg/keter/issues/64)
|
||||
|
||||
## 1.3.7
|
||||
|
||||
* Add ability to use middleware [#63](https://github.com/snoyberg/keter/pulls/63)
|
||||
|
@ -222,18 +222,23 @@ launchWorker AppManager {..} appid tstate tmnext mcurrentApp0 action0 = void $ f
|
||||
eres <- E.try $ App.start appStartConfig appid input
|
||||
case eres of
|
||||
Left e -> do
|
||||
let name =
|
||||
case appid of
|
||||
AIBuiltin -> "<builtin>"
|
||||
AINamed x -> x
|
||||
log $ ErrorStartingBundle name e
|
||||
return Nothing
|
||||
Right app -> return $ Just app
|
||||
processAction (Just app) (Reload input) = do
|
||||
App.reload app input
|
||||
-- reloading will /always/ result in a valid app, either the old one
|
||||
-- will continue running or the new one will replace it.
|
||||
return $ Just app
|
||||
eres <- E.try $ App.reload app input
|
||||
case eres of
|
||||
Left e -> do
|
||||
log $ ErrorStartingBundle name e
|
||||
-- reloading will /always/ result in a valid app, either the old one
|
||||
-- will continue running or the new one will replace it.
|
||||
return (Just app)
|
||||
Right () -> return $ Just app
|
||||
|
||||
name =
|
||||
case appid of
|
||||
AIBuiltin -> "<builtin>"
|
||||
AINamed x -> x
|
||||
|
||||
addApp :: AppManager -> FilePath -> IO ()
|
||||
addApp appMan bundle = do
|
||||
|
@ -1,5 +1,5 @@
|
||||
Name: keter
|
||||
Version: 1.3.7
|
||||
Version: 1.3.7.1
|
||||
Synopsis: Web application deployment manager, focusing on Haskell web frameworks
|
||||
Description: Hackage documentation generation is not reliable. For up to date documentation, please see: <http://www.stackage.org/package/keter>.
|
||||
Homepage: http://www.yesodweb.com/
|
||||
|
Loading…
Reference in New Issue
Block a user