code: def exception_occurred(self, text, is_traceback):
          
          # Skip errors without traceback or dismiss
          if (not is_traceback and self.error_dlg is None) or self.dismiss_error:
              return
  
          if CONF.get('main', 'show_internal_errors'):
              if self.error_dlg is None:
                  self.error_dlg = SpyderErrorDialog(self)
                  self.error_dlg.close_btn.clicked.connect(self.close_error_dlg)
                  self.error_dlg.rejected.connect(self.remove_error_dlg)
                  self.error_dlg.details.go_to_error.connect(self.go_to_error)
                  self.error_dlg.show()
              self.error_dlg.append_traceback(text)
          elif DEV or get_debug_level():
              self.dockwidget.show()
              self.dockwidget.raise_()
docs: Exception ocurred in the internal console.
  
          Show a QDialog or the internal console to warn the user.