def handle_crash(type, value, tb, plugins=""): """Function to handle any exception that is not addressed explicitly.""" if issubclass(type, KeyboardInterrupt): helpers.endThreads() import core.controllers.outputManager as om om.out.console(_("Thanks for using w3af.")) om.out.console(_("Bye!")) sys.exit(0) return # Print the information to the console so everyone can see it exception = traceback.format_exception(type, value, tb) exception = "".join(exception) print exception # Do not disclose user information in bug reports clean_exception = cleanup_bug_report(exception) # Save the info to a file for later analysis filename = create_crash_file(clean_exception) # Create the dialog that allows the user to send the bug to Trac bug_report_win = unhandled_bug_report.bug_report_window(_("Bug detected!"), clean_exception, filename, plugins) # Blocks waiting for user interaction bug_report_win.show()
def _handle_cancel(self, widg): # Exit w3af endThreads() self.destroy()
def _handle_cancel(self, widg): endThreads() self.destroy()