Skip to content

Commit

Permalink
Merge branch 'main' into #6-direct-launch-game
Browse files Browse the repository at this point in the history
  • Loading branch information
anon5r committed Feb 26, 2022
2 parents 1fdda0f + 59b5ea2 commit af566db
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions KsGameLauncher/MainContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,24 @@ internal ToolStripMenuItem CreateNewMenuItem(AppInfo appInfo, Font font, int ico
}
catch (LauncherException ex)
{
MessageBox.Show(String.Format(
"Launcher: {0}, Exception: {1}\nMessage: {2}\n\nSource: {3}\n\n{4}",
appInfo.Name, ex.GetType().Name, ex.Message, ex.Source, ex.StackTrace)
, ex.GetType().Name, MessageBoxButtons.OK, MessageBoxIcon.Error,
MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly);

if (ex.OpenURL != null)
{
DialogResult result = MessageBox.Show(ex.Message, Properties.Strings.AppName, MessageBoxButtons.YesNo,
MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly);
if (result == DialogResult.Yes)
{
Utils.Common.OpenUrlByDefaultBrowser(ex.OpenURL);
}
}
else
{
MessageBox.Show(String.Format(
"Launcher: {0}, Exception: {1}\nMessage: {2}\n\nSource: {3}\n\n{4}",
appInfo.Name, ex.GetType().Name, ex.Message, ex.Source, ex.StackTrace)
, ex.GetType().Name, MessageBoxButtons.OK, MessageBoxIcon.Error,
MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly);
}
}
catch (Exception ex)
{
Expand Down

0 comments on commit af566db

Please sign in to comment.