code: def dont_crash(fn):
      
  
      def safe_exec(self, *args, **kwargs):
          try:
              return fn(self, *args, **kwargs)
          except Exception as e:
              logging.exception(e)
              QMessageBox.information(
                  self, type(e).__name__, " ".join(str(x) for x in e.args)
              )
  
      return safe_exec
docs: Wraps callbacks: a simple information is raised in place of a program crash.