diff options
-rw-r--r-- | _oasis | 2 | ||||
-rw-r--r-- | src/vyconfd.ml | 12 |
2 files changed, 12 insertions, 2 deletions
@@ -65,7 +65,7 @@ Executable "vyconfd" Path: src MainIs: vyconfd.ml CompiledObject: best - BuildDepends: ppx_deriving_yojson.runtime + BuildDepends: ppx_deriving_yojson.runtime, lwt, lwt.unix Executable "vytree_test" Path: test diff --git a/src/vyconfd.ml b/src/vyconfd.ml index 4a5cd5d..29345fb 100644 --- a/src/vyconfd.ml +++ b/src/vyconfd.ml @@ -1,5 +1,15 @@ +open Lwt open Defaults -let config = Vyconf_config.load defaults.config_file +let () = Lwt_log.add_rule "*" Lwt_log.Info + +let config = + let result = Vyconf_config.load defaults.config_file in + match result with + | `Ok cfg -> cfg + | `Error err -> + Lwt_log.fatal (Printf.sprintf "Could not load the configuration file %s" err); exit 1 + + let () = print_endline "This is VyConf. Or, rather, will be." |