Make the exceptions compatible with Symfony 2.2