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
A good way to do it can be:
use Symfony\Component\HttpKernel\Exception\HttpException; throw new HttpException(\Symfony\Component\HttpFoundation\Response::HTTP_INTERNAL_SERVER_ERROR, 'Testing the 500 error');