Commit f8d5ced5 authored by catch's avatar catch
Browse files

Issue #3213023 by thursday_bw: Improve the intelligibility of error messages...

Issue #3213023 by thursday_bw: Improve the intelligibility of error messages in Entity/FieldConfig.php

(cherry picked from commit f1f7fb4f)
parent 109863e2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -312,10 +312,10 @@ public function getFieldStorageDefinition() {
      }

      if (!$field_storage_definition) {
        throw new FieldException("Attempt to create a field {$this->field_name} that does not exist on entity type {$this->entity_type}.");
        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.");
      }
      if (!$field_storage_definition instanceof FieldStorageConfigInterface) {
        throw new FieldException("Attempt to create a configurable field of non-configurable field storage {$this->field_name}.");
        throw new FieldException("Attempted to create a configurable field of non-configurable field storage {$this->field_name}.");
      }
      $this->fieldStorage = $field_storage_definition;
    }