mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
fix: log InnerException to crash log
This commit is contained in:
parent
8dfe882455
commit
8bb3bc2316
1 changed files with 6 additions and 0 deletions
|
@ -61,6 +61,12 @@ namespace SourceGit
|
||||||
builder.Append($"Source: {ex.Source}\n");
|
builder.Append($"Source: {ex.Source}\n");
|
||||||
builder.Append($"---------------------------\n\n");
|
builder.Append($"---------------------------\n\n");
|
||||||
builder.Append(ex.StackTrace);
|
builder.Append(ex.StackTrace);
|
||||||
|
while (ex.InnerException != null)
|
||||||
|
{
|
||||||
|
ex = ex.InnerException;
|
||||||
|
builder.Append($"\n\nInnerException::: {ex.GetType().FullName}: {ex.Message}\n");
|
||||||
|
builder.Append(ex.StackTrace);
|
||||||
|
}
|
||||||
|
|
||||||
var time = DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss");
|
var time = DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss");
|
||||||
var file = Path.Combine(Native.OS.DataDir, $"crash_{time}.log");
|
var file = Path.Combine(Native.OS.DataDir, $"crash_{time}.log");
|
||||||
|
|
Loading…
Reference in a new issue