code: def error(self, msg):
          
          print("***", msg, file=self.stdout)
  
          if not self.config.show_traceback_on_error:
              return
  
          etype, evalue, tb = sys.exc_info()
          if tb and tb.tb_frame.f_code.co_name == "default":
              tb = tb.tb_next
              if tb and tb.tb_frame.f_code.co_filename == "<stdin>":
                  tb = tb.tb_next
                  if tb:  # only display with actual traceback.
                      self._remove_bdb_context(evalue)
                      tb_limit = self.config.show_traceback_on_error_limit
                      fmt_exc = traceback.format_exception(
                          etype, evalue, tb, limit=tb_limit
                      )
  
                      # Remove last line (exception string again).
                      if len(fmt_exc) > 1 and fmt_exc[-1][0] != " ":
                          fmt_exc.pop()
  
                      print("".join(fmt_exc).rstrip(), file=self.stdout)
docs: Override/enhance default error method to display tracebacks.