Changeset 1122
- Timestamp:
- Mar 29, 2011, 7:34:41 AM (14 years ago)
- Location:
- Scheduling/trunk/cs/bsdx0200GUISourceCode
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocument.cs
r1117 r1122 1296 1296 } 1297 1297 1298 //DON'T USE OBVIOUSLY. JUST FOR TESTING. 1299 public void ThrowException() 1300 { 1301 throw new Exception("Hello World. I am an Exception."); 1302 } 1303 1298 1304 #endregion Methods 1299 1305 -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocumentManager.cs
r1121 r1122 186 186 static void Main(string[] args) 187 187 { 188 //Application wide error handler for unhandled errors (later I figure out that's only for WinForm ex'es) 189 Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException); 190 Application.ThreadException += new ThreadExceptionEventHandler(App_ThreadException); 191 192 // Add the event handler for handling non-UI thread exceptions to the event. 193 AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(App_DomainException); 194 188 195 #if DEBUG 189 196 // Print console messages to console if launched from console … … 231 238 Application.DoEvents(); 232 239 233 //Application wide error handler for unhandled errors 234 Application.ThreadException += new ThreadExceptionEventHandler(App_ThreadException); 240 //test 241 //doc.ThrowException(); 242 //test 235 243 236 244 #if TRACE … … 247 255 248 256 /// <summary> 249 /// Exception handler for application errors. TODO: Test 250 /// </summary> 257 /// Exception handler for application errors. Only for WinForm Errors. 258 /// </summary> 259 /// <remarks>Never tested. I can't get an error to go here!</remarks> 251 260 /// <param name="sender"></param> 252 261 /// <param name="e"></param> 253 262 static void App_ThreadException(object sender, ThreadExceptionEventArgs e) 254 263 { 255 if (e.Exception is System.Net.Sockets.SocketException)256 {257 MessageBox.Show("Looks like we lost our connection with the server\nClick OK to terminate the application.");258 Application.Exit();259 }260 261 264 string msg = "A problem has occured in this applicaton. \r\n\r\n" + 262 265 "\t" + e.Exception.Message + "\r\n\r\n" + … … 269 272 } 270 273 274 /// <summary> 275 /// If we are here, we are dead meat. 276 /// </summary> 277 /// <param name="sender"></param> 278 /// <param name="e"></param> 279 static void App_DomainException(object sender, UnhandledExceptionEventArgs e) 280 { 281 if (e.ExceptionObject is System.Net.Sockets.SocketException) 282 { 283 MessageBox.Show("Looks like we lost our connection with the server\nClick OK to terminate the application."); 284 } 285 else 286 { 287 Exception ex = e.ExceptionObject as Exception; 288 289 string msg = "A problem has occured in this applicaton. \r\n\r\n" + 290 "\t" + ex.InnerException.Message; 291 292 MessageBox.Show(msg, "Unexpected Error"); 293 } 294 }// here application terminates 271 295 272 296 #region BMXNet Event Handler -
Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj.user
r1121 r1122 37 37 </RemoteDebugMachine> 38 38 <StartAction>Project</StartAction> 39 <StartArguments>/s=192.168.56.101 /p=9260 /a=shabiel12 /v=catdog.77</StartArguments> 39 <StartArguments> 40 </StartArguments> 40 41 <StartPage> 41 42 </StartPage> -
Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.sln
r1120 r1122 11 11 EndGlobalSection 12 12 GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 {8C05C4F7-FE81-479F-87A0-44E04C7F6E0F}.Debug|Any CPU.ActiveCfg = Release|Any CPU14 {8C05C4F7-FE81-479F-87A0-44E04C7F6E0F}.Debug|Any CPU.Build.0 = Release|Any CPU13 {8C05C4F7-FE81-479F-87A0-44E04C7F6E0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 14 {8C05C4F7-FE81-479F-87A0-44E04C7F6E0F}.Debug|Any CPU.Build.0 = Debug|Any CPU 15 15 {8C05C4F7-FE81-479F-87A0-44E04C7F6E0F}.Release|Any CPU.ActiveCfg = Release|Any CPU 16 16 {8C05C4F7-FE81-479F-87A0-44E04C7F6E0F}.Release|Any CPU.Build.0 = Release|Any CPU 17 {DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Debug|Any CPU.ActiveCfg = Release|Any CPU18 {DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Debug|Any CPU.Build.0 = Release|Any CPU17 {DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 18 {DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Debug|Any CPU.Build.0 = Debug|Any CPU 19 19 {DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Release|Any CPU.ActiveCfg = Release|Any CPU 20 20 {DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Release|Any CPU.Build.0 = Release|Any CPU
Note:
See TracChangeset
for help on using the changeset viewer.