// Err returns the current error (if any)
9753
func (lex *GotestLexer) Err() error {
	if lex.err != nil {
		return lex.err
	}
	return lex.scanner.Err()
}
435632
func (e *Errors) Err(format string, a ...interface{}) error {
	return e.add(Error, format, a...)
}
846098
func (p *Parser) Err() error {
	if p.err != nil {
		return p.err
	}
	return p.r.Err()
}
105886
func (l *Logger) Err(msg string) error {
	return l.logMsg(nil, LEVEL_ERR, msg)
}
473837
func (es *SubscribeToShardEventStream) Err() error {
	if err := es.Reader.Err(); err != nil {
		return err
	}
	es.StreamCloser.Close()

	return nil
}
405166
func (r *StatusResp) Err() error {
	if r == nil {
		// No status response, connection closed before we get one
		return errors.New("imap: connection closed during command execution")
	}

	if r.Type == StatusRespNo || r.Type == StatusRespBad {
		return errors.New(r.Info)
	}
	return nil
}
1246979
func (parser *Parser) err() error {
	if parser.tokenError() {
		token := parser.nextToken()
		return fmt.Errorf("Tokenizer error: %s", token.String())
	}

	return nil
}
335526
func (c *Conn) Err() error {
	if c.ErrMock == nil {
		return nil
	}

	return c.ErrMock()
}
565791
func EnsureErr(w Errer) error {
	err := w.Err()
	if err == nil {
		return errors.Errorf("expected an error from %v, got nil", w)
	} else if err == tomb.ErrStillAlive {
		return errors.Annotatef(err, "expected %v to be stopped", w)
	}
	return errors.Trace(err)
}
881900
func (e *Event) Errs(key string, errs []error) *Event {
	if e == nil {
		return e
	}
	arr := Arr()
	for _, err := range errs {
		switch m := ErrorMarshalFunc(err).(type) {
		case LogObjectMarshaler:
			arr = arr.Object(m)
		case error:
			arr = arr.Err(m)
		case string:
			arr = arr.Str(m)
		default:
			arr = arr.Interface(m)
		}
	}

	return e.Array(key, arr)
}
167762
func (errs Errors) ToError() error {
	if len(errs) == 0 {
		return nil
	}
	if len(errs) == 1 {
		return errs[0]
	}
	return errs
}
220347
func (n *Node) Err(ctx context.Context) error {
	select {
	case <-n.closed:
		return n.err
	case <-ctx.Done():
		return ctx.Err()
	}
}
20164
func (r *responseIterator) Err() error {
	if r.response.Err != "" {
		return fmt.Errorf(r.response.Err)
	}

	return nil
}
857305
func ToError(err error) error {
	switch e := err.(type) {
	case *cli.ExitError:
		return e
	case nil:
		return nil
	default:
		return cli.NewExitError(err.Error(), -1)
	}
}
88903
func (c *Ctrl) Err() error {
	if c.Streamer == nil {
		return nil
	}
	return c.Streamer.Err()
}
286366
func (iter *Iterator) Err() error {
	var cErr *C.char
	C.rocksdb_iter_get_error(iter.c, &cErr)
	if cErr != nil {
		defer C.free(unsafe.Pointer(cErr))
		return errors.New(C.GoString(cErr))
	}
	return nil
}
1314213
func (e *Error) ToError() error {
	if e == nil {
		return nil
	}

	code := codes.Code(e.GrpcCode)
	err := status.Errorf(code, "%s", e.Msg)
	if e.Transient || grpcutil.IsTransientCode(code) {
		err = transient.Tag.Apply(err)
	}
	return err
}