This commit is contained in:
swrup 2025-11-20 21:43:19 +01:00
parent 270f56cdd6
commit 5e2f5a3a3e
2 changed files with 6 additions and 2 deletions

View file

@ -16,7 +16,7 @@ type section = {
}
let fail_with msg =
Fmt.epr "Failed to parse configuration: %s.@." msg;
Fmt.epr "Configuration failure: %s.@." msg;
exit 1
let is_eol = function '\n' | '\r' -> true | _ -> false

View file

@ -121,7 +121,11 @@ module Currency = struct
(Fmt.str
"section `[currency-%s]` not found, currency `%s` is not defined"
Exchange.currency Exchange.currency)
| Some v -> v
| Some v -> (
match v.enabled = `YES with
| false ->
fail_with (Fmt.str "currency `%s` is not enabled" Exchange.currency)
| true -> v)
end
module Coin = struct