8000 [DoctrineBridge] Improved exception message · symfony/symfony@db2ee54 · GitHub
[go: up one dir, main page]

Skip to content

Commit db2ee54

Browse files
committed
[DoctrineBridge] Improved exception message
1 parent 99321cb commit db2ee54

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,10 @@ private function load()
392392
private function getIdentifierValues($entity)
393393
{
394394
if (!$this->em->contains($entity)) {
395-
throw new FormException('Entities passed to the choice field must be managed');
395+
throw new FormException(
396+
'Entities passed to the choice field must be managed. Maybe ' .
397+
'persist them in the entity manager?'
398+
);
396399
}
397400

398401
$this->em->initializeObject($entity);

0 commit comments

Comments
 (0)
0