Issue #2883025 by pameeela, joachim, mradcliffe: Exception messages in FieldConfig::getFieldStorageDefinition() are inaccurate
(cherry picked from commit 1174006d30
)
merge-requests/7413/head
parent
27e8fd6aec
commit
f9caeefc28
|
@ -313,10 +313,10 @@ class FieldConfig extends FieldConfigBase implements FieldConfigInterface {
|
|||
}
|
||||
|
||||
if (!$field_storage_definition) {
|
||||
throw new FieldException("Attempted to create an instance of field with name {$this->field_name} on entity type {$this->entity_type} when the field storage does not exist.");
|
||||
throw new FieldException("Attempted to create, modify or delete an instance of field with name {$this->field_name} on entity type {$this->entity_type} when the field storage does not exist.");
|
||||
}
|
||||
if (!$field_storage_definition instanceof FieldStorageConfigInterface) {
|
||||
throw new FieldException("Attempted to create a configurable field of non-configurable field storage {$this->field_name}.");
|
||||
throw new FieldException("Attempted to create, modify or delete a configurable field of non-configurable field storage {$this->field_name}.");
|
||||
}
|
||||
$this->fieldStorage = $field_storage_definition;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue