From: Timo Sirainen Date: Tue, 30 Jan 2024 16:29:17 +0000 (+0200) Subject: config: Add setting name as prefix to error messages when possible X-Git-Tag: 2.4.1~1081 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43d82bfff3a69af62629c2876b089bdf9afd4f3b;p=thirdparty%2Fdovecot%2Fcore.git config: Add setting name as prefix to error messages when possible --- diff --git a/src/config/config-parser.c b/src/config/config-parser.c index e6f41ad486..1366af2467 100644 --- a/src/config/config-parser.c +++ b/src/config/config-parser.c @@ -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); }