def addException(): global errors #self.widget._report_exception() try: typ, val, tb = sys.exc_info() traceback.print_exception(typ, val, tb) if errors: errors.append("") exception = traceback.format_exception(typ, val, tb) errors.extend(exception) if len(errors) > 100: # If too many errors are found send the error report ReportDialog(self.widget) except: say(str(sys.exc_info()))
def addException(): """collect and report exceptions""" # self.widget._report_exception() try: typ, val, tb = sys.exc_info() traceback.print_exception(typ, val, tb) if OCV.errors: OCV.errors.append("") exception = traceback.format_exception(typ, val, tb) OCV.errors.extend(exception) if len(OCV.errors) > 100: # do nothing for now print(OCV.errors) except: say(str(sys.exc_info()))