Disable internal Error Message

Rely on GameMonitor to display error message.
This commit is contained in:
steelphase
2014-10-11 11:19:04 -04:00
committed by Matthias Mailänder
parent af3e3f795f
commit beef3242b8
2 changed files with 0 additions and 49 deletions

View File

@@ -127,48 +127,5 @@ namespace OpenRA
return path;
}
public static void ShowFatalErrorDialog()
{
var process = "OpenRA.CrashDialog.exe";
var args = "";
if (CurrentPlatform == PlatformType.OSX)
{
// Winforms requires X11 under OSX, which may not exist.
// Show a native dialog using applescript instead.
var title = "Fatal Error";
var logsButton = "View Logs";
var faqButton = "View FAQ";
var quitButton = "Quit";
var message = "OpenRA has encountered a fatal error.\nRefer to the crash logs and FAQ for more information.";
var faqPath = Game.Settings.Debug.FatalErrorDialogFaq;
var logsPath = "file://" + Platform.SupportDir + "Logs" + Path.DirectorySeparatorChar;
var iconPath = new [] { "./OpenRA.icns", "./packaging/osx/template.app/Contents/Resources/OpenRA.icns" }.FirstOrDefault(f => File.Exists(f));
var icon = iconPath != null ? "with icon alias (POSIX file \\\"file://{0}\\\")".F(Environment.CurrentDirectory + "/" + iconPath) : "";
process = "/usr/bin/osascript";
args = (
"-e \"repeat\"\n" +
"-e \" tell application \\\"Finder\\\"\"\n" +
"-e \" set question to display dialog \\\"{1}\\\" with title \\\"{0}\\\" {2} buttons {{\\\"{3}\\\", \\\"{5}\\\", \\\"{7}\\\"}} default button 3\"\n" +
"-e \" if button returned of question is equal to \\\"{3}\\\" then open (POSIX file \\\"{4}\\\")\"\n" +
"-e \" if button returned of question is equal to \\\"{5}\\\" then open location \\\"{6}\\\"\"\n" +
"-e \" if button returned of question is equal to \\\"{7}\\\" then exit repeat\"\n" +
"-e \" activate\"\n" +
"-e \" end tell\"\n" +
"-e \"end repeat\""
).F(title, message, icon, logsButton, logsPath, faqButton, faqPath, quitButton);
}
if (CurrentPlatform == PlatformType.Linux)
process = "error-dialog.sh";
var psi = new ProcessStartInfo(process, args);
psi.UseShellExecute = false;
psi.CreateNoWindow = true;
Process.Start(psi);
}
}
}

View File

@@ -60,12 +60,6 @@ namespace OpenRA
var rpt = BuildExceptionReport(e).ToString();
Log.Write("exception", "{0}", rpt);
Console.Error.WriteLine(rpt);
if (Game.Settings.Debug.ShowFatalErrorDialog && !Game.Settings.Server.Dedicated)
{
Game.Renderer.Device.Dispose();
Platform.ShowFatalErrorDialog();
}
}
static StringBuilder BuildExceptionReport(Exception e)