Skip to content

Commit

Permalink
Include Inner exception in the error log file
Browse files Browse the repository at this point in the history
  • Loading branch information
MirisWisdom committed Mar 16, 2023
1 parent b149c16 commit 9cea0ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,13 @@ private static void Main(string[] args)
catch (Exception e)
{
var log = Combine(GetFolderPath(Desktop), "GShade.Nuke.log");
WriteAllText(log, e.StackTrace);
AppendAllText(log, e.StackTrace);
AppendAllText(log, e.InnerException.StackTrace);
WriteLine($"An error has occurred: {e.Message}. Refer to the log file for more details: {log}");
}

WriteLine("Press any key to continue...");
ReadLine();
}
}
}
}

0 comments on commit 9cea0ea

Please sign in to comment.