Better ExceptionListener implementation as refer to Symfony\Component\Security\Http\Firewall\ExceptionListener.