From ba5d235a32dc2a2711404efc39149c990d713405 Mon Sep 17 00:00:00 2001 From: Praburaj Date: Tue, 18 Nov 2014 17:06:08 -0800 Subject: [PATCH] Function name not passed to LoadFrame method when file name is not present in stacktrace When file names are missing from exception stack trace the above line of code does not pass the detected function name. As a result issue described in bug : https://github.com/aspnet/Diagnostics/issues/49 happens. This issue happens on mono. With this fix method names show up in the error page middleware output on mono. --- 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 440acba3ef..4545601bae 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(line.ToString(), string.Empty, 0, showSource) + ? LoadFrame(function, string.Empty, 0, showSource) : LoadFrame(function, file, lineNumber, showSource); }