[Form] Improved exception message if the data class is not found

This commit is contained in:
Fabien Potencier 2015-01-16 16:35:16 +01:00
parent 56f315495c
commit 414583607c
1 changed files with 1 additions and 1 deletions

View File

@ -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;