// exceptionData creates an Exception from an error.
500509
func exceptionData(e error) *Exception {
	var xerr *Exception
	if c, ok := e.(causer); ok {
		xerr = &Exception{Message: c.Cause().Error()}
	} else {
		xerr = &Exception{Message: e.Error()}
	}
	if s, ok := e.(stackTracer); ok {
		st := s.StackTrace()
		ln := len(st)
		if ln > maxStackDepth {
			ln = maxStackDepth
		}
		frames := make([]*StackEntry, ln)
		for i := 0; i < ln; i++ {
			f := st[i]
			line, _ := strconv.Atoi(fmt.Sprintf("%d", f))
			frames[i] = &StackEntry{
				Path:  fmt.Sprintf("%s", f),
				Line:  line,
				Label: fmt.Sprintf("%n", f),
			}
		}
		xerr.Stack = frames
	}

	return xerr
}
306436
func (s *GetProtectionStatusOutput) SetData(v string) *GetProtectionStatusOutput {
	s.Data = &v
	return s
}
753235
func (s *Certificate) SetData(v string) *Certificate {
	s.Data = &v
	return s
}
99197
func safeArrayAllocData(safearray *SafeArray) (err error) {
	err = convertHresultToError(procSafeArrayAllocData.Call(uintptr(unsafe.Pointer(safearray))))
	return
}
101116
func requestData(req *http.Request) *Request {
	var (
		scheme = "http"
		host   = req.Host
	)
	if len(req.URL.Scheme) > 0 {
		scheme = req.URL.Scheme
	}
	if len(req.URL.Host) > 0 {
		host = req.URL.Host
	}

	return &Request{
		Method:        req.Method,
		URL:           fmt.Sprintf("%s://%s%s", scheme, host, req.URL.Path),
		ClientIP:      getIP(req),
		UserAgent:     req.UserAgent(),
		ContentLength: req.ContentLength,
	}
}
638336
func (tn *TreeNode) ChildData() *ChildData {
	tn.RLock()
	defer tn.RUnlock()
	return tn.childData
}
1105443
func staticData(w *rest.ResponseWriter, r *rest.Request) {
	fileToServe := path.Join(staticRoot(), r.PathParam("resource"))
	http.ServeFile(
		w.ResponseWriter,
		r.Request,
		fileToServe)
}
152665
func (G *global_data) SetData(key, value string) *global_data {
	if G.Req.Data == nil {
		G.Req.Data = make(map[string]string)
	}
	G.Req.Data[key] = value
	return G
}
725956
func LoadedData(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "loadeddata", Listener: listener}
}
1209806
func LoadData(file string) ([]byte, error) {
	if len(file) == 0 {
		return []byte{}, nil
	}

	bytes, err := ioutil.ReadFile(file)
	if err != nil {
		return []byte{}, err
	}

	return bytes, nil
}
715304
func (s *ThirdPartyJobDetails) SetData(v *ThirdPartyJobData) *ThirdPartyJobDetails {
	s.Data = v
	return s
}
380989
func (r ExceptionDetails) Error() string {
	var desc string
	if r.Exception.Description != nil {
		desc = ": " + *r.Exception.Description
	}
	return fmt.Sprintf("runtime.ExceptionDetails: %s exception at %d:%d%s", r.Text, r.LineNumber, r.ColumnNumber, desc)
}
45868
func (s *DescribeConfigurationRevisionResponse) SetData(v string) *DescribeConfigurationRevisionResponse {
	s.Data = &v
	return s
}
732353
func (s *GCMMessage) SetData(v map[string]*string) *GCMMessage {
	s.Data = v
	return s
}
492333
func (e *Error) GetData(key DataKey) interface{} {
	if e.data != nil {
		val, ok := e.data[key]
		if ok {
			return val
		}
		if boolWrapper(e.data[disableInheritance], false) {
			return nil
		}
	}
	return e.class.data[key]
}
242590
func (d *domainClient) RequestData(ctx context.Context, args *RequestDataArgs) (reply *RequestDataReply, err error) {
	reply = new(RequestDataReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "IndexedDB.requestData", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "IndexedDB.requestData", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "IndexedDB", Op: "RequestData", Err: err}
	}
	return
}
360238
func safeArrayAccessData(safearray *SafeArray) (element uintptr, err error) {
	err = convertHresultToError(
		procSafeArrayAccessData.Call(
			uintptr(unsafe.Pointer(safearray)),
			uintptr(unsafe.Pointer(&element))))
	return
}