From 5e2f5a3a3eb04ee3db9d021a631a39fa53d799f6 Mon Sep 17 00:00:00 2001 From: swrup Date: Thu, 20 Nov 2025 21:43:19 +0100 Subject: [PATCH] --- include/parse_config.ml | 2 +- src/config.ml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/parse_config.ml b/include/parse_config.ml index e8ab68ca..115d1af7 100644 --- a/include/parse_config.ml +++ b/include/parse_config.ml @@ -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 diff --git a/src/config.ml b/src/config.ml index 197d586f..992961d6 100644 --- a/src/config.ml +++ b/src/config.ml @@ -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