} else if (strcmp(name, "bit") == 0) {
if (CURRENT_FRAME(dctx)->da->type != FR_TYPE_STRUCT) {
- fr_strerror_const("Bit fields can only be used inside of a STRUCT");
+ fr_strerror_const("Bit fields can only be defined as a MEMBER of data type 'struct'");
return -1;
}
}
if (da->flags.extra && (da->flags.subtype == FLAG_BIT_FIELD)) {
- fr_strerror_const("Bit fields can only be defined as a MEMBER of a STRUCT");
+ fr_strerror_const("Bit fields can only be defined as a MEMBER of data type 'struct'");
goto error;
}
* Unions need a key field. And key fields can only appear inside of a struct.
*/
if (da->type == FR_TYPE_UNION) {
- fr_strerror_const("ATTRIBUTEs of type 'union' can only appear inside of a parent of type 'struct'");
+ fr_strerror_const("ATTRIBUTEs of type 'union' can only be defined as a MEMBER of data type 'struct'");
return -1;
}
}
if (da->flags.extra && (da->flags.subtype == FLAG_BIT_FIELD)) {
- fr_strerror_const("Bit fields can only be defined as a MEMBER of a STRUCT");
+ fr_strerror_const("Bit fields can only be defined as a MEMBER of data type 'struct'");
goto error;
}
}
if (da->flags.extra && (da->flags.subtype == FLAG_BIT_FIELD)) {
- fr_strerror_const("Bit fields can only be defined as a MEMBER of a STRUCT");
+ fr_strerror_const("Bit fields can only be defined as a MEMBER of a data type 'struct'");
goto error;
}
}
if (CURRENT_FRAME(dctx)->da->type != FR_TYPE_STRUCT) {
- fr_strerror_printf("MEMBER can only be used for ATTRIBUTEs of type 'struct', not %s of type %s",
- CURRENT_FRAME(dctx)->da->name,
+ fr_strerror_printf("MEMBER can only be used for ATTRIBUTEs of type 'struct', not for data type %s",
fr_type_to_str(CURRENT_FRAME(dctx)->da->type));
return -1;
}