Before the message why a failure happened (like a parsing error) was lost.
Signed-off-by: Petr Pudlak <pudlak@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
newcfg <- loadConfig path
let !newdata = case newcfg of
Ok !cfg -> Ok cfg
- Bad _ -> Bad "Cannot load configuration"
+ Bad msg -> Bad $ "Cannot load configuration from " ++ path
+ ++ ": " ++ msg
save_fn newdata
case newcfg of
Ok cfg -> logInfo ("Loaded new config, serial " ++
-- fork the polling timer
unless has_inotify $ do
_ <- forkIO $ onPollTimer inotiaction conf_file save_fn statemvar
- return ()
\ No newline at end of file
+ return ()