RynthSuite/Tools/RynthCore.LootEditor/Program.cs
Tom Bohar 0a4b611a90 RynthSuite as of 2026-09-05 (internal a5ff5c2)
A snapshot of the working tree for aelrynth.com/git/: the code, build files
and public docs. Internal review notes and agent instructions are left out.
MIT licensed; see LICENSE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 21:23:05 -04:00

39 lines
967 B
C#

using Avalonia;
using System;
using System.IO;
namespace RynthCore.LootEditor;
class Program
{
internal static readonly string LogPath =
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "LootEditor.log");
[System.STAThread]
public static void Main(string[] args)
{
AppDomain.CurrentDomain.UnhandledException += (_, e) =>
Log($"UNHANDLED: {e.ExceptionObject}");
try
{
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
}
catch (Exception ex)
{
Log($"FATAL: {ex}");
throw;
}
}
internal static void Log(string msg)
{
try { File.AppendAllText(LogPath, $"[{DateTime.Now:HH:mm:ss}] {msg}\n"); }
catch { /* best-effort */ }
}
public static AppBuilder BuildAvaloniaApp() =>
AppBuilder.Configure<App>()
.UsePlatformDetect()
.LogToTrace();
}