Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.GTK
comparison FrmMainWindow.cs @ 74:52b731576845
Fixes #79: Make use of GTK# callback for exceptions
* Tests of calling method on GLib.ExceptionManager to trigger event showed dialog appropriately
Also:
* Remove unused code
* Commit changes to objects.xml
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Tue, 23 Nov 2010 20:05:37 +0000 |
parents | 3b4a646b4054 |
children | 68804784bf6f |
comparison
equal
deleted
inserted
replaced
73:19e7123aafd5 | 74:52b731576845 |
---|---|
90 MessageDialog dialog = new MessageDialog(null, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, false, "An unhandled exception occurred. Please check the log for more details."); | 90 MessageDialog dialog = new MessageDialog(null, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, false, "An unhandled exception occurred. Please check the log for more details."); |
91 dialog.Run(); | 91 dialog.Run(); |
92 dialog.Hide(); | 92 dialog.Hide(); |
93 dialog.Dispose(); | 93 dialog.Dispose(); |
94 } | 94 } |
95 | |
96 private static string GetStackTrace(Exception ex) | |
97 { | |
98 string message = ""; | |
99 | |
100 if (ex != null) | |
101 { | |
102 message = "Caused by: " + ex.GetType().FullName + Environment.NewLine + ex.StackTrace + Environment.NewLine ; | |
103 } | |
104 | |
105 return message; | |
106 } | |
107 | 95 |
108 public FrmMainWindow() : this(new string[0]) | 96 public FrmMainWindow() : this(new string[0]) |
109 { | 97 { |
110 //Do nothing extra | 98 //Do nothing extra |
111 } | 99 } |