qol: interpolated strings

This commit is contained in:
Gary Sharp
2025-07-20 11:56:34 +10:00
parent 4e518d6684
commit 7faebe56a8
108 changed files with 342 additions and 350 deletions
+5 -5
View File
@@ -86,15 +86,15 @@ namespace Disco.ClientBootstrapper
{
try
{
string AppErrorPath = string.Format("{0}{1}", System.Reflection.Assembly.GetExecutingAssembly().Location, ".errors.txt");
string AppErrorPath = $"{System.Reflection.Assembly.GetExecutingAssembly().Location}.errors.txt";
System.Text.StringBuilder ErrorMessage = new System.Text.StringBuilder();
ErrorMessage.AppendLine();
ErrorMessage.AppendLine(DateTime.Now.ToLongDateString());
ErrorMessage.AppendLine(DateTime.Now.ToLongTimeString());
ErrorMessage.AppendLine(string.Format("Type: {0}", ex.GetType().FullName));
ErrorMessage.AppendLine(string.Format("Message: {0}", ex.Message));
ErrorMessage.AppendLine(string.Format("Source: {0}", ex.Source));
ErrorMessage.AppendLine(string.Format("Stack: {0}", ex.StackTrace));
ErrorMessage.AppendLine($"Type: {ex.GetType().FullName}");
ErrorMessage.AppendLine($"Message: {ex.Message}");
ErrorMessage.AppendLine($"Source: {ex.Source}");
ErrorMessage.AppendLine($"Stack: {ex.StackTrace}");
System.IO.File.AppendAllText(AppErrorPath, ErrorMessage.ToString());
}
catch (Exception) { }