if (_x->data.ptr) switch (_x->da->type) {\
case PW_TYPE_OCTETS:\
case PW_TYPE_TLV:\
- (void) talloc_get_type_abort(_x->data.ptr, uint8_t);\
+ if (!talloc_get_type(_x->data.ptr, uint8_t)) {\
+ fr_perror("Type check failed for attribute \"%s\"", _x->da->name);\
+ (void) talloc_get_type_abort(_x->data.ptr, uint8_t);\
+ }\
break;\
case PW_TYPE_STRING:\
- (void) talloc_get_type_abort(_x->data.ptr, char);\
+ if (!talloc_get_type(_x->data.ptr, char)) {\
+ fr_perror("Type check failed for attribute \"%s\"", _x->da->name);\
+ (void) talloc_get_type_abort(_x->data.ptr, char);\
+ }\
break;\
default:\
break;\