浏览代码

More descriptive exception when adding duplicate or incorrect fields in ListMapper

Konstantin Tjuterev 13 年之前
父节点
当前提交
ada3df5de0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Datagrid/ListMapper.php

+ 1 - 1
Datagrid/ListMapper.php

@@ -70,7 +70,7 @@ class ListMapper
                 $fieldDescriptionOptions
             );
         } else {
-            throw new \RuntimeException('invalid state');
+            throw new \RuntimeException('Unknown or duplicate field name in list mapper. Field name should be either of FieldDescriptionInterface interface or string. Names should be unique.');
         }
 
         if (!$fieldDescription->getLabel()) {