mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-07 08:34:06 +02:00
Add Reporter.HandleEarlyFailure for non-recoverable errors before Reporter is setup
This commit is contained in:
parent
61f6543041
commit
11f5f9b72e
15
Reporter.cs
15
Reporter.cs
@ -70,5 +70,20 @@ public void HandleException(string caption, string message, bool canIgnore, Exce
|
||||
Environment.FailFast(message, e);
|
||||
}
|
||||
}
|
||||
|
||||
public static void HandleEarlyFailure(string caption, string message){
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
|
||||
FormMessage form = new FormMessage(caption, message, MessageBoxIcon.Error);
|
||||
form.AddButton("Exit");
|
||||
form.ShowDialog();
|
||||
|
||||
try{
|
||||
Process.GetCurrentProcess().Kill();
|
||||
}catch{
|
||||
Environment.FailFast(message, new Exception(message));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user