Fixed exception handling to not throw exceptions that are unavailable in symfony 2.1