[Form] Improved exception message if the data class is not found
This commit is contained in:
parent
56f315495c
commit
414583607c
|
@ -193,7 +193,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
|
|||
self::validateName($name);
|
||||
|
||||
if (null !== $dataClass && !class_exists($dataClass)) {
|
||||
throw new InvalidArgumentException(sprintf('The data class "%s" is not a valid class.', $dataClass));
|
||||
throw new InvalidArgumentException(sprintf('Class "%s" not found. Is the "data_class" form option set correctly?', $dataClass));
|
||||
}
|
||||
|
||||
$this->name = (string) $name;
|
||||
|
|
Reference in New Issue