def _excepthook(self, etype, value, tb): if isinstance(etype, ChildProcessException): s = "Using GUI:\n\n" + value.printable_traceback else: s = "Using GUI:\n\n" + get_str_from_traceback(etype, value, tb) # bug - display a dialog with the entire exception and traceback printed out traceback.print_tb(tb) dlg = wx.MessageDialog(self.main_window, ERROR_MSG + "\n" + QUESTION_TEXT, style=wx.ICON_ERROR | wx.YES_NO) # Get a string with the traceback and send it answer = dlg.ShowModal() if answer == wx.ID_YES: print "Sending bug report!" bugsender = BugReporter(error_str=s) success = bugsender.send() # Dialog with success or not of the ftp uploading if success: msg = "The bug report was successfully uploaded." style = 0 else: msg = "Couldn't upload the bug report!\n\nPlease, try again later." style = wx.ICON_ERROR dlg = wx.MessageDialog(self.main_window, msg, style=style) dlg.ShowModal() else: dlg = wx.MessageDialog(self.main_window, "Error msg:\n\n" + s, style=wx.ICON_ERROR) dlg.ShowModal()