[Monodevelop-patches-list] r2708 - trunk/MonoDevelop/Core/src/MonoDevelop.Startup
Lluis Sanchez <lluis@ximian.com>
lluis at mono-cvs.ximian.com
Wed Aug 3 08:07:48 EDT 2005
Author: lluis
Date: 2005-08-03 08:07:48 -0400 (Wed, 03 Aug 2005)
New Revision: 2708
Modified:
trunk/MonoDevelop/Core/src/MonoDevelop.Startup/ChangeLog
trunk/MonoDevelop/Core/src/MonoDevelop.Startup/MonoDevelopMain.cs
Log:
2005-08-03 Lluis Sanchez Gual <lluis at novell.com>
* MonoDevelopMain.cs: Show an error dialog if something goes wrong
while initializing.
2005-08-03 Ben Motmans <ben.motmans at gmail.com>
* MonoDevelopMain.cs: Show a meaningfull error when the local
hostname cannot be resolved
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Startup/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Startup/ChangeLog 2005-08-03 12:04:32 UTC (rev 2707)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Startup/ChangeLog 2005-08-03 12:07:48 UTC (rev 2708)
@@ -1,3 +1,13 @@
+2005-08-03 Lluis Sanchez Gual <lluis at novell.com>
+
+ * MonoDevelopMain.cs: Show an error dialog if something goes wrong
+ while initializing.
+
+2005-08-03 Ben Motmans <ben.motmans at gmail.com>
+
+ * MonoDevelopMain.cs: Show a meaningfull error when the local
+ hostname cannot be resolved
+
2005-07-29 Lluis Sanchez Gual <lluis at novell.com>
* MonoDevelop.Startup.glade:
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Startup/MonoDevelopMain.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Startup/MonoDevelopMain.cs 2005-08-03 12:04:32 UTC (rev 2707)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Startup/MonoDevelopMain.cs 2005-08-03 12:07:48 UTC (rev 2708)
@@ -97,6 +97,17 @@
new Gnome.Program (name, version, Gnome.Modules.UI, remainingArgs);
Gdk.Threads.Init();
commandLineArgs = remainingArgs;
+
+ //remoting check
+ try {
+ Dns.GetHostByName (Dns.GetHostName ());
+ } catch {
+ ErrorDialog dialog = new ErrorDialog (null);
+ dialog.Message = "MonoDevelop failed to start. Local hostname cannot be resolved.";
+ dialog.AddDetails ("Your network may be misconfigured. Make sure the hostname of your system is added to the /etc/hosts file.", true);
+ dialog.Run ();
+ return 1;
+ }
SplashScreenForm.SetCommandLineArgs(remainingArgs);
@@ -112,6 +123,8 @@
RunMainLoop ();
ArrayList commands = null;
+ Exception error = null;
+
try {
SetSplashInfo(0.1, "Initializing Icon Service ...");
ServiceManager.AddService(new IconService());
@@ -144,17 +157,21 @@
// no alternative for Application.ThreadException?
// Application.ThreadException += new ThreadExceptionEventHandler(ShowErrorBox);
- } catch (XmlException e) {
- Console.WriteLine("Could not load XML :\n" + e.Message);
- return 1;
} catch (Exception e) {
- Console.WriteLine("Loading error, please reinstall :\n" + e.ToString());
- return 1;
+ error = e;
} finally {
if (SplashScreenForm.SplashScreen != null) {
SplashScreenForm.SplashScreen.Hide();
}
}
+
+ if (error != null) {
+ ErrorDialog dialog = new ErrorDialog (null);
+ dialog.Message = "MonoDevelop failed to start. The following error has been reported: " + error.Message;
+ dialog.AddDetails (error.ToString (), false);
+ dialog.Run ();
+ return 1;
+ }
// FIXME: we should probably track the last 'selected' one
// and do this more cleanly
More information about the Monodevelop-patches-list
mailing list