Skip to content

Commit

Permalink
[Form] Improved exception message if the data class is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jan 16, 2015
1 parent 56f3154 commit 4145836
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Form/FormConfigBuilder.php
Expand Up @@ -193,7 +193,7 @@ public function __construct($name, $dataClass, EventDispatcherInterface $dispatc
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;
Expand Down

0 comments on commit 4145836

Please sign in to comment.