// Implements DropboxError interface.
429635
func (e *baseError) StackFrames() []StackFrame {
	e.framesOnce.Do(func() {
		e.stackFrames = make([]StackFrame, len(e.stack))
		for i, pc := range e.stack {
			frame := &e.stackFrames[i]
			frame.PC = pc
			frame.Func = runtime.FuncForPC(pc)
			if frame.Func != nil {
				frame.FuncName = frame.Func.Name()
				frame.File, frame.LineNumber = frame.Func.FileLine(frame.PC - 1)
			}
		}
	})
	return e.stackFrames
}
721536
func (ld Loader) FprintError(w io.Writer, err error) {
	ld.fprintError(w, err, monochrome())
}
1194463
func (c *Client) download(path string, in interface{}, r io.Reader) (io.ReadCloser, int64, error) {
	url := "https://content.dropboxapi.com/2" + path

	body, err := json.Marshal(in)
	if err != nil {
		return nil, 0, err
	}

	req, err := http.NewRequest("POST", url, r)
	if err != nil {
		return nil, 0, err
	}
	req.Header.Set("Authorization", "Bearer "+c.AccessToken)
	req.Header.Set("Dropbox-API-Arg", string(body))

	if r != nil {
		req.Header.Set("Content-Type", "application/octet-stream")
	}

	return c.do(req)
}
735266
func (ec *ErrorCollection) AddErrorCollection(errs *ErrorCollection) {
	ec.lock.Lock()
	defer ec.lock.Unlock()

	for _, err := range errs.Errors {
		ec.addError(err)
	}
}
1026989
func (mg *Migration) dropTableIfExists(structPtr interface{}) {
	tn := tableName(structPtr)
	_, err := mg.db.Exec(mg.dialect.dropTableSql(tn))
	if err != nil && !mg.dialect.catchMigrationError(err) {
		panic(err)
	}
}
1155109
func (m *DbMap) dropTable(t reflect.Type, name string, addIfExists bool) error {
	table := tableOrNil(m, t, name)
	if table == nil {
		return fmt.Errorf("table %s was not registered", table.TableName)
	}

	return m.dropTableImpl(table, addIfExists)
}
435399
func dieIfError(err error, cleanup ...func()) {
	if err != nil {
		log.Println("Error:")
		for _, cb := range cleanup {
			cb()
		}
		log.Fatalln(err.Error())
	}
	return
}
210559
func (c *Client) ErrorWithStackSkip(level string, err error, skip int) {
	c.ErrorWithStackSkipWithExtras(level, err, skip, noExtras)
}
141486
func RejectConnectionError(options ...RejectOption) error {
	err := new(rejectConnectionError)
	for _, opt := range options {
		opt(err)
	}
	return err
}
974148
func (e JSONCliError) Error() string {
	b, err := json.MarshalIndent(e.data, "", "  ")
	if err != nil {
		panic(err)
	}

	return string(b)
}
490879
func MinError(f reflect.StructField, actual, min interface{}) error {
	return fmt.Errorf("%s: %v less than %v", f.Name, actual, min)
}
613993
func (i *Iterator) Error() error {
	if i.err == io.EOF {
		return nil
	}
	return i.err
}
1319697
func (c *UDPConnection) DropPackets() {
	close(c.PacketQueue)
	c.PacketQueue = make(chan *packet.Packet, MaximumUDPQueueLen)
}
452024
func (d *decodeState) saveError(err error) {
	if d.savedError == nil {
		d.savedError = err
	}
}
969307
func DropDB(c *Connection) error {
	deets := c.Dialect.Details()
	if deets.Database != "" {
		log(logging.Info, fmt.Sprintf("drop %s (%s)", deets.Database, c.URL()))
		return errors.Wrapf(c.Dialect.DropDB(), "couldn't drop database %s", deets.Database)
	}
	return nil
}
1235543
func (m *MultiError) Error() string {
	m.mutex.Lock()
	defer m.mutex.Unlock()

	formattedError := make([]string, len(m.errs))
	for i, e := range m.errs {
		formattedError[i] = e.Error()
	}

	return strings.Join(formattedError, ", ")
}
446360
func (chunk *Chunk) GotError(linenum int, msg string) {
	if rx, ok := chunk.wantErrs[linenum]; ok {
		delete(chunk.wantErrs, linenum)
		if !rx.MatchString(msg) {
			chunk.report.Errorf("%s:%d: error %q does not match pattern %q", chunk.filename, linenum, msg, rx)
		}
	} else {
		chunk.report.Errorf("%s:%d: unexpected error: %v", chunk.filename, linenum, msg)
	}
}