sonata-project/SonataAdminBundle — pull request #1877 by lvarayut (2013-12-30 10:26:00+00:00)
Title: Specify an error massage by adding throw StringCastException

I found that there are many people searching on the internet when they got the error:

```
ContextErrorException: Catchable Fatal Error: Object of class Acme\Bundle\DemoBundle\Entity\Roles could not be converted to string in /Applications/XAMPP/xamppfiles/htdocs/symfony/vendor/sonata-project/admin-bundle/Sonata/AdminBundle/Form/ChoiceList/ModelChoiceList.php line 142

```
So now, the type of error is specified clearly. It helps beginner people a lot to understand what's going on and fix it easily.

Q | A
----|-----
Bug fix? |	no
New feature? |	no
BC breaks? | no
Deprecations? |	no
Tests pass? | yes
License | MIT