code: func (s *Status) SetError(err error) {
  
  	if err == nil {
  		s.Code = ""
  		s.Message = ""
  		s.Errors = nil
  		return
  	}
  
  	cause := errors.Cause(err)
  
  	if astErr, ok := cause.(ast.Errors); ok {
  		s.Code = errCode
  		s.Message = types.MsgCompileModuleError
  		s.Errors = make([]error, len(astErr))
  		for i := range astErr {
  			s.Errors[i] = astErr[i]
  		}
  	} else {
  		s.Code = errCode
  		s.Message = err.Error()
  		s.Errors = nil
  	}
  }
docs: // SetError updates the status object to reflect a failure to download or
  // activate. If err is nil, the error status is cleared.