{{ exception.message }} in Twig doesn't render HTML
问题 I have this controller where \Exception is raised (I haven't figured out which SF2 Exception to use yet) upon certain condition. Here is it: <?php namespace My\AppBundle\Controller; use .... class MyController extends Controller { const EXCEPTION_MESSAGE = <<<EOF My <b>HTML</b> <br/> <small>Small phrase</small> EOF; public function indexAction() { // my logic if(in_array($data, $array)) throw new \Exception(self::EXCEPTION_MESSAGE); // the rest of my logic return .... } } And in app/Resources