From 8467349305fcd8aaf7a6a29c692a6dd2bb96016d Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sat, 8 Jun 2013 19:19:26 -0700 Subject: [PATCH] fixed exceptron file name in stacktrace. --- Exceptron.Client/ExceptronClient.cs | 11 +++++++++-- Exceptron.Client/Message/Frame.cs | 5 +++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Exceptron.Client/ExceptronClient.cs b/Exceptron.Client/ExceptronClient.cs index eebf7366b..2326459c3 100644 --- a/Exceptron.Client/ExceptronClient.cs +++ b/Exceptron.Client/ExceptronClient.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Reflection; using System.Threading; using System.Web; @@ -252,15 +253,21 @@ internal static List ConvertToFrames(Exception exception) var method = frame.GetMethod(); var declaringType = method.DeclaringType; + var fileName = frame.GetFileName(); + + if (!string.IsNullOrWhiteSpace(fileName)) + { + fileName = new FileInfo(fileName).Name; + } + var currentFrame = new Frame { i = index, - //fn = frame.GetFileName(), + fn = fileName, ln = frame.GetFileLineNumber(), m = method.ToString(), }; - currentFrame.m = currentFrame.m.Substring(currentFrame.m.IndexOf(' ')).Trim(); diff --git a/Exceptron.Client/Message/Frame.cs b/Exceptron.Client/Message/Frame.cs index 6fdc1a919..e4ea6ce22 100644 --- a/Exceptron.Client/Message/Frame.cs +++ b/Exceptron.Client/Message/Frame.cs @@ -21,5 +21,10 @@ internal class Frame /// Class name for current frame /// public string c { get; set; } + + /// + /// File name for current frame + /// + public string fn { get; set; } } } \ No newline at end of file