Clearer error messages
authorAlan T. DeKok <aland@freeradius.org>
Tue, 14 Oct 2014 13:07:45 +0000 (09:07 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 14 Oct 2014 15:06:44 +0000 (11:06 -0400)
src/main/map.c

index 5d5139c..afb2666 100644 (file)
@@ -368,7 +368,8 @@ int map_afrom_cp(TALLOC_CTX *ctx, value_pair_map_t **out, CONF_PAIR *cp,
                case T_OP_ADD:
                        if ((map->rhs->type != TMPL_TYPE_LIST) &&
                            (map->rhs->type != TMPL_TYPE_EXEC)) {
-                               cf_log_err(ci, "Invalid source for list '+='");
+                               cf_log_err(ci, "Invalid source for list assignment '%s += ...'",
+                                          map->lhs->name);
                                goto error;
                        }
                        break;
@@ -381,14 +382,16 @@ int map_afrom_cp(TALLOC_CTX *ctx, value_pair_map_t **out, CONF_PAIR *cp,
                        }
 
                        if (map->rhs->type != TMPL_TYPE_LIST) {
-                               cf_log_err(ci, "Invalid source for ':=' operator");
+                               cf_log_err(ci, "Invalid source for list assignment '%s := ...'",
+                                          map->lhs->name);
                                goto error;
                        }
                        break;
 
                case T_OP_EQ:
                        if (map->rhs->type != TMPL_TYPE_EXEC) {
-                               cf_log_err(ci, "Invalid source for '=' operator");
+                               cf_log_err(ci, "Invalid source for list assignment '%s = ...'",
+                                          map->lhs->name);
                                goto error;
                        }
                        break;