diff --git a/modules/field/field.crud.inc b/modules/field/field.crud.inc index 83863d6..fccac55 100644 --- a/modules/field/field.crud.inc +++ b/modules/field/field.crud.inc @@ -60,11 +60,11 @@ function field_create_field($field) { } // Field type is required. if (empty($field['type'])) { - throw new FieldException('Attempt to create a field with no type.'); + throw new FieldException(format_string('Attempt to create field @field_name with no type.', array('@field_name' => $field['field_name']))); } // Field name cannot contain invalid characters. if (!preg_match('/^[_a-z]+[_a-z0-9]*$/', $field['field_name'])) { - throw new FieldException('Attempt to create a field with invalid characters. Only lowercase alphanumeric characters and underscores are allowed, and only lowercase letters and underscore are allowed as the first character'); + throw new FieldException(format_string('Attempt to create a field @field_name with invalid characters. Only lowercase alphanumeric characters and underscores are allowed, and only lowercase letters and underscore are allowed as the first character', array('@field_name' => $field['field_name']))); } // Field name cannot be longer than 32 characters. We use drupal_strlen()