private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
try
{
Log.Error("Oh no! Ferghus escaped his memory block and infected the rest of the server!");
Log.Error("Aura has encountered an unexpected and unrecoverable error. We're going to try to save as much as we can.");
}
catch { }
try
{
this.Server.Stop();
}
catch { }
try
{
// save the world
}
catch { }
try
{
Log.Exception((Exception)e.ExceptionObject);
Log.Status("Closing server.");
}
catch { }
CliUtil.Exit(1, false);
}