fr_strerror_clear();
if (tmpl_cast_in_place(vpt, type, da) < 0) {
- fr_strerror_printf_push("Failed parsing value as type '%s'",
- fr_table_str_by_value(fr_value_box_type_table, type, "??"));
return -1;
}
}
if (err == FR_SBUFF_PARSE_ERROR_NOT_FOUND) {
- fr_strerror_printf("Cannot parse type '%s' from input string",
+ fr_strerror_printf("Failed parsing string as type '%s'",
fr_table_str_by_value(fr_value_box_type_table, dst_type, "<INVALID>"));
} else {
fr_sbuff_parse_error_to_strerror(err);
# literals are parsed when the conditions are parsed
condition <integer>X == 1
-match ERROR offset 9: token not found: Failed parsing value as type 'uint32'
+match ERROR offset 9: Failed parsing string as type 'uint32'
condition &NAS-Port == X
-match ERROR offset 13: token not found: Failed parsing value as type 'uint32'
+match ERROR offset 13: Failed parsing string as type 'uint32'
#
# The RHS is a static string, so this gets mashed to a literal,
match 00:11:22:33:44:55 == "%{md4:00:11:22:33:44:55}"
condition <ether> 00:XX:22:33:44:55 == 00:11:22:33:44:55
-match ERROR offset 8: Missing separator, expected ':': Failed parsing value as type 'ether'
+match ERROR offset 8: Missing separator, expected ':'
#
# Tests for boolean data types.
match true
condition <ipaddr>127.0.0.1/327 == 127.0.0.1
-match ERROR offset 8: Invalid IPv4 mask length "/327". Should be between 0-32: Failed parsing value as type 'ipaddr'
+match ERROR offset 8: Invalid IPv4 mask length "/327". Should be between 0-32
condition <ipaddr>127.0.0.1/32 == 127.0.0.1
match true