// Code to execute on Unhandled Exceptions private void Application_UnhandledException(object sender, UnhandledExceptionEventArgs e) { MainPage.deb("Unhandled Exception in " + sender.GetType().FullName + " \nTrace : " + e.Exception.StackTrace + " \nMessage : " + e.Message); // just ignore QuitException if (e.Exception is QuitException) { return; } if (System.Diagnostics.Debugger.IsAttached) { // An unhandled exception has occurred; break into the debugger System.Diagnostics.Debugger.Break(); } }