From 58b1ae171251be3479b66267e60de376acc99375 Mon Sep 17 00:00:00 2001 From: Praburaj Date: Thu, 20 Nov 2014 16:24:04 -0800 Subject: [PATCH] A regression introduced in a recent change With this fix a case is regressed. https://github.com/aspnet/Diagnostics/commit/ba5d235a32dc2a2711404efc39149c990d713405 If file information is not available if function is empty then line needs to be sent. With the regression empty lines were printed in error page where symbol information is not available. This fixes it. Thanks Chris for identitying this and fixing. --- src/Microsoft.AspNet.Diagnostics/ErrorPageMiddleware.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.AspNet.Diagnostics/ErrorPageMiddleware.cs b/src/Microsoft.AspNet.Diagnostics/ErrorPageMiddleware.cs index 4545601bae..9b7b6f4953 100644 --- a/src/Microsoft.AspNet.Diagnostics/ErrorPageMiddleware.cs +++ b/src/Microsoft.AspNet.Diagnostics/ErrorPageMiddleware.cs @@ -142,7 +142,7 @@ namespace Microsoft.AspNet.Diagnostics int lineNumber = line.ToInt32(); return string.IsNullOrEmpty(file) - ? LoadFrame(function, string.Empty, 0, showSource) + ? LoadFrame(string.IsNullOrEmpty(function) ? line.ToString() : function, string.Empty, 0, showSource) : LoadFrame(function, file, lineNumber, showSource); }