Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions FinTrack/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ protected override async void OnStartup(StartupEventArgs e)
await _host.StartAsync();

var logger = _host.Services.GetRequiredService<ILogger<App>>();
logger.LogInformation("Uygulama başlatıldı ve Host çalışıyor.");
logger.LogInformation("Application started and Host is running.");

var window = _host.Services.GetRequiredService<AuthenticatorWindow>();
window.Show();
Expand All @@ -123,17 +123,17 @@ private void SetupGlobalExceptionHandling()
DispatcherUnhandledException += (sender, e) =>
{
var logger = _host.Services.GetRequiredService<ILogger<App>>();
logger.LogCritical(e.Exception, "YAKALANAMAYAN UI HATASI!");
logger.LogCritical(e.Exception, "UNHANDLED UI EXCEPTION!");

MessageBox.Show("Beklenmedik bir hata oluştu. Uygulama kapanacak. Detaylar log dosyasına yazıldı.", "Kritik Hata", MessageBoxButton.OK, MessageBoxImage.Error);
MessageBox.Show("An unexpected error occurred. The application will close. Details have been written to the log file.", "Critical Error", MessageBoxButton.OK, MessageBoxImage.Error);
e.Handled = true;
Shutdown();
};

AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
{
var logger = _host.Services.GetRequiredService<ILogger<App>>();
logger.LogCritical(e.ExceptionObject as Exception, "YAKALANAMAYAN ARKA PLAN HATASI!");
logger.LogCritical(e.ExceptionObject as Exception, "UNHANDLED BACKGROUND EXCEPTION!");
};
}

Expand Down
Loading
Loading