// Err returns a writer for error messages for a given pdbg instance.
// By default, os.StdErr
432723
func (pdbg *Pdbg) Err() io.Writer {
	if pdbg.serr == nil {
		return os.Stderr
	}
	return pdbg.serr
}
397276
func (c Context) Err() error {
	if m := c.Conditions & c.Traps; m != 0 {
		return m
	}
	return nil
}
1366844
func Errm(attrs map[string]interface{}, format string, va ...interface{}) error {
	return logDefaultMsg(attrs, LEVEL_ERR, format, va...)
}
288998
func (r *Reader) Err() error {
	if r.err == io.EOF {
		return nil
	}
	return r.err
}
108334
func Err(key string) error {
	v, ok := camErrors[key]
	if !ok {
		panic(fmt.Sprintf("unknown/unregistered error key %v", key))
	}
	return v
}
29255
func (l *lexer) err(e error) Error {
	// do we have an error?
	if e == nil {
		return nil
	} else {
		return NewError(e, l.Position())
	}
}
1059894
func (w *Writer) Err(m string) error {
	_, err := w.writeAndRetry(LOG_ERR, m)
	return err
}
335526
func (c *Conn) Err() error {
	if c.ErrMock == nil {
		return nil
	}

	return c.ErrMock()
}
1246979
func (parser *Parser) err() error {
	if parser.tokenError() {
		token := parser.nextToken()
		return fmt.Errorf("Tokenizer error: %s", token.String())
	}

	return nil
}
1037590
func (g *Group) Err() error {
	g.wg.Wait()
	if len(g.errs) > 0 {
		return g.errs[0]
	}
	return nil
}
31148
func (worker *Worker) err(e error) {
	if worker.ErrorHandler != nil {
		worker.ErrorHandler(e)
	}
}
516866
func (m *Message) Err() (error, error) {
	if m.Type != Err {
		return nil, badType
	}
	s, err := m.Str()
	if err != nil {
		return nil, err
	}
	return errors.New(s), nil
}
164244
func ErrorR(req *http.Request, err error, data Data) {
	ErrorC(GetRequestID(req), err, data)
}
9753
func (lex *GotestLexer) Err() error {
	if lex.err != nil {
		return lex.err
	}
	return lex.scanner.Err()
}
289802
func (c *Completion) Err() error {
	c.lock.Lock()
	defer c.lock.Unlock()
	return c.err
}
987143
func (p *parser) err(e error) Error {
	// convert the error to include the parser position
	return NewError(e, p.Position())
}
629470
func (m *Manager) errf(s string, v ...interface{}) error {
	err := fmt.Errorf(s, v...)
	if m.Errorf == nil {
		m.log("ERROR: %v", err)
	} else {
		m.Errorf(s, v)
	}
	return err
}