moved renderError() into base View class