Mason should use set_error_handler to return a list of errors from render instead of rendering them into the source of the page.