Beispiel #1
0
 def do_show():
     try:
         self.buf.append(raw)
         self.formatter.render_raw(raw, self.cursor)
     except:
         import traceback
         prints(traceback.format_exc())
         prints(raw, end='')
 def do_show():
     try:
         self.buf.append(raw)
         self.formatter.render_raw(raw, self.cursor)
     except:
         import traceback
         prints(traceback.format_exc())
         prints(raw, end='')
Beispiel #3
0
 def show_error(self, is_syntax_err, tb, controller=None):
     if self.prompt_frame is not None:
         # At a prompt, so redirect output
         return prints(tb, end='')
     try:
         self.buf.append(tb)
         if is_syntax_err:
             self.formatter.render_syntax_error(tb, self.cursor)
         else:
             self.formatter.render(self.tb_lexer.get_tokens(tb), self.cursor)
     except:
         prints(tb, end='')
     self.ensureCursorVisible()
     QApplication.processEvents()
 def show_error(self, is_syntax_err, tb, controller=None):
     if self.prompt_frame is not None:
         # At a prompt, so redirect output
         return prints(tb, end='')
     try:
         self.buf.append(tb)
         if is_syntax_err:
             self.formatter.render_syntax_error(tb, self.cursor)
         else:
             self.formatter.render(self.tb_lexer.get_tokens(tb), self.cursor)
     except:
         prints(tb, end='')
     self.ensureCursorVisible()
     QApplication.processEvents()
Beispiel #5
0
 def unhandled_exception(self, type, value, tb):
     if type == KeyboardInterrupt:
         return
     try:
         sio = StringIO.StringIO()
         traceback.print_exception(type, value, tb, file=sio)
         fe = sio.getvalue()
         prints(fe)
         try:
             val = unicode(value)
         except:
             val = repr(value)
         msg = "<b>%s</b>:" % type.__name__ + val
         error_dialog(self, _("ERROR: Unhandled exception"), msg, det_msg=fe, show=True)
     except BaseException:
         pass
 def unhandled_exception(self, type, value, tb):
     if type == KeyboardInterrupt:
         return
     try:
         sio = StringIO.StringIO()
         traceback.print_exception(type, value, tb, file=sio)
         fe = sio.getvalue()
         prints(fe)
         try:
             val = unicode(value)
         except:
             val = repr(value)
         msg = '<b>%s</b>:'%type.__name__ + val
         error_dialog(self, _('ERROR: Unhandled exception'), msg,
                 det_msg=fe, show=True)
     except BaseException:
         pass