]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: Add setting name as prefix to error messages when possible
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 30 Jan 2024 16:29:17 +0000 (18:29 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Jan 2025 08:39:58 +0000 (10:39 +0200)
src/config/config-parser.c

index e6f41ad48657c3210ce0531c63f26662d5e051a2..1366af246758994e7ff14c1ffa97405103dffe1f 100644 (file)
@@ -1947,7 +1947,10 @@ void config_parser_apply_line(struct config_parser_context *ctx,
                                line->key;
                        if (config_apply_line_full(ctx, line, key_with_path,
                                                   str_c(ctx->value), &full_key,
-                                                  &root_setting) == 0) {
+                                                  &root_setting) < 0) {
+                               ctx->error = p_strdup_printf(ctx->pool,
+                                       "%s: %s", line->key, ctx->error);
+                       } else {
                                config_parser_check_warnings(ctx, full_key,
                                                             root_setting);
                        }