Add automatic versioning and server configuration XML in preparation for services

This commit is contained in:
John Gross
2017-02-05 08:26:48 -08:00
parent fa63f3d811
commit d5159dc72a
33 changed files with 501 additions and 216 deletions

View File

@@ -1,12 +1,17 @@
using System;
using System.Windows;
using NLog;
namespace Torch.Client
{
public static class Program
{
private static Logger _log = LogManager.GetLogger("Torch");
public static void Main(string[] args)
{
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
var client = new TorchClient();
try
@@ -15,11 +20,18 @@ namespace Torch.Client
}
catch (Exception e)
{
MessageBox.Show($"Torch encountered an error trying to initialize the game.\n{e.Message}");
_log.Fatal("Torch encountered an error trying to initialize the game.");
_log.Fatal(e);
return;
}
client.Start();
}
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
var ex = (Exception)e.ExceptionObject;
MessageBox.Show(ex.StackTrace, ex.Message);
}
}
}