@using System @using System.Globalization @using System.Linq @using Views @functions { /// /// /// public ErrorPageModel Model { get; set; } } @{ Response.StatusCode = 500; // TODO: Response.ReasonPhrase = "Internal Server Error"; Response.ContentType = "text/html"; Response.ContentLength = null; // Clear any prior Content-Length string location = string.Empty; } @Resources.ErrorPageHtml_Title Hello

@Resources.ErrorPageHtml_UnhandledException

@if (Model.Options.ShowExceptionDetails) { foreach (var errorDetail in Model.ErrorDetails) {

@errorDetail.Error.GetType().Name: @errorDetail.Error.Message

@{ StackFrame firstFrame = null; firstFrame = errorDetail.StackFrames.FirstOrDefault(); if (firstFrame != null) { location = firstFrame.Function; }/* TODO: TargetSite is not defined else if (errorDetail.Error.TargetSite != null && errorDetail.Error.TargetSite.DeclaringType != null) { location = errorDetail.Error.TargetSite.DeclaringType.FullName + "." + errorDetail.Error.TargetSite.Name; }*/ } if (!string.IsNullOrEmpty(location) && firstFrame != null && !string.IsNullOrEmpty(firstFrame.File)) {

@location in @System.IO.Path.GetFileName(firstFrame.File), line @firstFrame.Line

} else if (!string.IsNullOrEmpty(location)) {

@location

} else {

@Resources.ErrorPageHtml_UnknownLocation

} } } else {

@Resources.ErrorPageHtml_EnableShowExceptions

} @if (Model.Options.ShowExceptionDetails) {
} @if (Model.Options.ShowQuery) {
@if (Model.Query.Any()) { @foreach (var kv in Model.Query.OrderBy(kv => kv.Key)) { foreach (var v in kv.Value) { } }
@Resources.ErrorPageHtml_VariableColumn @Resources.ErrorPageHtml_ValueColumn
@kv.Key @v
} else {

@Resources.ErrorPageHtml_NoQueryStringData

}
} @if (Model.Options.ShowCookies) { /* TODO:
@if (Model.Cookies.Any()) { @foreach (var kv in Model.Cookies.OrderBy(kv => kv.Key)) { }
@Resources.ErrorPageHtml_VariableColumn @Resources.ErrorPageHtml_ValueColumn
@kv.Key @kv.Value
} else {

@Resources.ErrorPageHtml_NoCookieData

}
*/ } @if (Model.Options.ShowHeaders) {
@if (Model.Headers.Any()) { @foreach (var kv in Model.Headers.OrderBy(kv => kv.Key)) { foreach (var v in kv.Value) { } }
@Resources.ErrorPageHtml_VariableColumn @Resources.ErrorPageHtml_ValueColumn
@kv.Key @v
} else {

@Resources.ErrorPageHtml_NoHeaderData

}
} @if (Model.Options.ShowEnvironment) { /* TODO:
@foreach (var kv in Model.Environment.OrderBy(kv => kv.Key)) { }
@Resources.ErrorPageHtml_VariableColumn @Resources.ErrorPageHtml_ValueColumn
@kv.Key @kv.Value
*/ }