code: def __safe_validation_callback(self, event):
          # type: (str) -> Any
          
          if self.state == StoredInstance.KILLED:
              # Invalid state
              return None
  
          try:
              return self.__validation_callback(event)
          except FrameworkException as ex:
              # Important error
              self._logger.exception(
                  "Critical error calling back %s: %s", self.name, ex
              )
  
              # Kill the component
              self._ipopo_service.kill(self.name)
  
              # Store the exception as it is a validation error
              self.error_trace = traceback.format_exc()
  
              if ex.needs_stop:
                  # Framework must be stopped...
                  self._logger.error(
                      "%s said that the Framework must be stopped.", self.name
                  )
                  self.bundle_context.get_framework().stop()
              return False
          except:
              self._logger.exception(
                  "Component '%s': error calling @ValidateComponent callback",
                  self.name,
              )
  
              # Store the exception as it is a validation error
              self.error_trace = traceback.format_exc()
  
              return False
docs: Calls the ``@ValidateComponent`` or ``@InvalidateComponent`` callback,
          ignoring raised exceptions
  
          :param event: The kind of life-cycle callback (in/validation)
          :return: The callback result, or None