I am wondering how would I simulate a 500 error in Symfony 2.
I have been reading this post where Raise suggests throwing an exception
You have to use Symfony\Component\HttpKernel\Exception\HttpException.
Another way should be doing something like 1/0;, but I haven't tested it.
1/0;