private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { Log.Error("Unhandled exception", (Exception) e.ExceptionObject); }