private HtmlDom GetErrorDom(string extraMessages="")
{
var builder = new StringBuilder();
builder.Append("<html><body style='font-family:arial,sans'>");
if(_storage != null)
{
builder.AppendLine(_storage.GetBrokenBookRecommendationHtml());
}
else
{
builder.AppendLine(BookStorage.GenericBookProblemNotice);
}
builder.Append(((StringBuilderProgress) _log).Text);//review: is this ever non-empty?
builder.Append("<p>"+ WebUtility.HtmlEncode(extraMessages)+"</p>");
var message = LocalizationManager.GetString("Errors.ReportThisProblemButton", "Report this problem to Bloom Support");
builder.AppendFormat(
"<input type='button' value='"+message+"' href='ReportProblem'></input>");
builder.Append("</body></html>");
return new HtmlDom(builder.ToString());
}