From ac8f751771964da9308e5bea5c2723f8ce90e490 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Wed, 3 Aug 2016 15:34:09 -0700 Subject: [PATCH] [Fixes #324] Diagnostics middleware no longer has a way to expand the source for compilation errors --- .../Views/CompilationErrorPage.cs | 134 ++++++++++-------- .../Views/CompilationErrorPage.cshtml | 17 ++- 2 files changed, 88 insertions(+), 63 deletions(-) diff --git a/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/CompilationErrorPage.cs b/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/CompilationErrorPage.cs index 29b0a8881d..325f9181a5 100644 --- a/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/CompilationErrorPage.cs +++ b/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/CompilationErrorPage.cs @@ -91,13 +91,16 @@ using Microsoft.AspNetCore.Diagnostics #line hidden #line 29 "CompilationErrorPage.cshtml" - int tabIndex = 6; + + var stackFrameCount = 0; + var frameId = ""; + #line default #line hidden WriteLiteral(" "); -#line 30 "CompilationErrorPage.cshtml" +#line 33 "CompilationErrorPage.cshtml" var fileName = errorDetail.StackFrames.FirstOrDefault()?.File; if (!string.IsNullOrEmpty(fileName)) @@ -107,13 +110,13 @@ using Microsoft.AspNetCore.Diagnostics #line hidden WriteLiteral("
"); -#line 34 "CompilationErrorPage.cshtml" +#line 37 "CompilationErrorPage.cshtml" Write(fileName); #line default #line hidden WriteLiteral("
\r\n"); -#line 35 "CompilationErrorPage.cshtml" +#line 38 "CompilationErrorPage.cshtml" } @@ -121,7 +124,7 @@ using Microsoft.AspNetCore.Diagnostics #line hidden WriteLiteral(" "); -#line 37 "CompilationErrorPage.cshtml" +#line 40 "CompilationErrorPage.cshtml" if (!string.IsNullOrEmpty(errorDetail.ErrorMessage)) { @@ -129,55 +132,64 @@ using Microsoft.AspNetCore.Diagnostics #line hidden WriteLiteral("
"); -#line 39 "CompilationErrorPage.cshtml" +#line 42 "CompilationErrorPage.cshtml" Write(errorDetail.ErrorMessage); #line default #line hidden WriteLiteral("
\r\n"); -#line 40 "CompilationErrorPage.cshtml" +#line 43 "CompilationErrorPage.cshtml" } #line default #line hidden WriteLiteral("
\r\n \r\n
\r\n \r\n"); -#line 86 "CompilationErrorPage.cshtml" +#line 93 "CompilationErrorPage.cshtml" } #line default diff --git a/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/CompilationErrorPage.cshtml b/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/CompilationErrorPage.cshtml index f76bcf4e6f..932d677b9c 100644 --- a/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/CompilationErrorPage.cshtml +++ b/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage/Views/CompilationErrorPage.cshtml @@ -26,7 +26,10 @@ @foreach (var errorDetail in Model.ErrorDetails) {
- @{ int tabIndex = 6; } + @{ + var stackFrameCount = 0; + var frameId = ""; + } @{ var fileName = errorDetail.StackFrames.FirstOrDefault()?.File; if (!string.IsNullOrEmpty(fileName)) @@ -42,8 +45,11 @@
- } + } }