]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
clearer errors
authorAlan T. DeKok <aland@freeradius.org>
Fri, 10 Jan 2025 14:10:46 +0000 (09:10 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 10 Jan 2025 14:48:21 +0000 (09:48 -0500)
src/lib/util/dict_tokenize.c

index 8501728dc3d0e8d63f0206b10833826bb320811b..d8c0f41a2d4e709e8f028e3afec801e63d95de42 100644 (file)
@@ -2046,7 +2046,9 @@ static int dict_read_process_member(dict_tokenize_ctx_t *dctx, char **argv, int
        }
 
        if (dctx->stack[dctx->stack_depth].da->type != FR_TYPE_STRUCT) {
-               fr_strerror_const("MEMBER can only be used for ATTRIBUTEs of type 'struct'");
+               fr_strerror_printf("MEMBER can only be used for ATTRIBUTEs of type 'struct', not %s of type %s",
+                                  dctx->stack[dctx->stack_depth].da->name,
+                                  fr_type_to_str(dctx->stack[dctx->stack_depth].da->type));
                return -1;
        }