public string ErrorHtml(Exception exception, IOwinContext owin) { var template = new ErrorPageTemplate(); template.Formatters = Formatters.Select(f => f(exception, owin)).Where(t => t != null).ToArray(); template.ErrorCode = owin.Response.StatusCode; template.ErrorDescription = "Unhandled exception occured"; template.Summary = exception.GetType().FullName + ": " + LimitLength(exception.Message, 600); return(template.TransformText()); }
public string ErrorHtml(Exception exception, IHttpContext context) { var template = new ErrorPageTemplate(); template.Formatters = Formatters.Select(f => f(exception, context)) .Concat(context.GetEnvironmentTabs().Select(o => DictionarySection.Create(o.Item1, "env_" + o.Item1.GetHashCode(), o.Item2))) .Where(t => t != null).ToArray(); template.ErrorCode = context.Response.StatusCode; template.ErrorDescription = "Unhandled exception occured"; template.Summary = exception.GetType().FullName + ": " + LimitLength(exception.Message, 600); return(template.TransformText()); }