예제 #1
0
 def __init__(self, exc_type, exc_obj, exc_tb, title=None):
     QDialog.__init__(self)
     self.ui = Ui_ExceptHookDialog()
     self.ui.setupUi(self)
     if title:
         self.setWindowTitle(self.windowTitle() + ": " + title)
     msg = "%s: %s" % (exc_type.__name__, exc_obj)
     self.ui.exceptionLabel.setText(msg)
     html = cgitb.text((exc_type, exc_obj, exc_tb))
     self.ui.tracebackBrowser.setText(html)
     self.resize(650, 350)  # give enough space to see the backtrace better
 def __init__(self, exc_type, exc_obj, exc_tb, title=None):
     QDialog.__init__(self)
     self.ui = Ui_ExceptHookDialog()
     self.ui.setupUi(self)
     if title:
         self.setWindowTitle(self.windowTitle() + ": " + title)
     self.ui.detailsButton.setCheckable(True)
     msg = "%s: %s" % (exc_type.__name__, exc_obj)
     self.ui.exceptionLabel.setText(msg)
     html = cgitb.html((exc_type, exc_obj, exc_tb))
     self.ui.tracebackBrowser.setText(html)
     self.resize(self.sizeHint())