Improve handling of exceptions thrown in `Form.Load` handlers
obviously only benefits forms inheriting `FormBase`
This commit is contained in:
parent
9393e1b764
commit
3dcc3ff89f
|
@ -66,7 +66,17 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
try
|
||||
{
|
||||
base.OnLoad(e);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
using ExceptionBox box = new(ex);
|
||||
box.ShowDialog(owner: this);
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
if (OSTailoredCode.IsUnixHost) FixBackColorOnControls(this);
|
||||
UpdateWindowTitle();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue