mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
fixed exceptron file name in stacktrace.
This commit is contained in:
parent
c4badd72bd
commit
8467349305
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
@ -252,15 +253,21 @@ internal static List<Frame> ConvertToFrames(Exception exception)
|
|||||||
var method = frame.GetMethod();
|
var method = frame.GetMethod();
|
||||||
var declaringType = method.DeclaringType;
|
var declaringType = method.DeclaringType;
|
||||||
|
|
||||||
|
var fileName = frame.GetFileName();
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(fileName))
|
||||||
|
{
|
||||||
|
fileName = new FileInfo(fileName).Name;
|
||||||
|
}
|
||||||
|
|
||||||
var currentFrame = new Frame
|
var currentFrame = new Frame
|
||||||
{
|
{
|
||||||
i = index,
|
i = index,
|
||||||
//fn = frame.GetFileName(),
|
fn = fileName,
|
||||||
ln = frame.GetFileLineNumber(),
|
ln = frame.GetFileLineNumber(),
|
||||||
m = method.ToString(),
|
m = method.ToString(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
currentFrame.m = currentFrame.m.Substring(currentFrame.m.IndexOf(' ')).Trim();
|
currentFrame.m = currentFrame.m.Substring(currentFrame.m.IndexOf(' ')).Trim();
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,5 +21,10 @@ internal class Frame
|
|||||||
/// Class name for current frame
|
/// Class name for current frame
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string c { get; set; }
|
public string c { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// File name for current frame
|
||||||
|
/// </summary>
|
||||||
|
public string fn { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user