-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathProgram.cs
More file actions
30 lines (28 loc) · 948 Bytes
/
Copy pathProgram.cs
File metadata and controls
30 lines (28 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
namespace FestivalInstrumentMapper
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
Application.Run(new MainWindow());
}
// Exception.Message doesn't include the exception type
public static string GetFirstLine(this Exception ex)
{
return ex.ToString().Split('\n')[0];
}
public static string WriteErrorFile(Exception ex)
{
string fileName = $"error_{DateTime.Now:yyyy-MM-dd_HH-mm-ss}.txt";
File.WriteAllText(fileName, ex.ToString());
return fileName;
}
}
}