add encode option to BaseHtml::error method