'Cache that the `error` occurred while processing `mod_path`.'

def cache_log_error(self, mod_path, error, distribution=None):

    mod_path = fix_pyext(mod_path)
    if (not os.path.exists(mod_path)):
        return
    mtime = os.stat(mod_path).st_mtime
    self.cache_insert(mod_path, mtime, None, distribution, error)
