Fixes claroline/CoreBundle#664
Merge branch 'master' of https://github.com/claroline/CoreBundle into bugfix
Using correct exception.
Merge pull request #705 from ngodfraind/bugfix

Bugfix