// Err returns the error returned from io.Reader. It may still return valid bytes for a while though.
337586
func (z *StreamLexer) Err() error {
	if z.err == io.EOF && z.pos < len(z.buf) {
		return nil
	}
	return z.err
}
397276
func (c Context) Err() error {
	if m := c.Conditions & c.Traps; m != 0 {
		return m
	}
	return nil
}
870145
func (l *List) Err() error {
	if len(l.errs) == 0 {
		return nil
	}

	if l.err != nil {
		switch len(l.errs) {
		case 1:
			l.err = l.errs[0]

		default:
			var sb strings.Builder
			sb.WriteString(l.errs[0].Error())
			for _, err := range l.errs[1:] {
				sb.WriteRune('\n')
				sb.WriteString(err.Error())
			}
			l.err = errors.New(sb.String())
		}
	}

	return l.err
}
473837
func (es *SubscribeToShardEventStream) Err() error {
	if err := es.Reader.Err(); err != nil {
		return err
	}
	es.StreamCloser.Close()

	return nil
}
108334
func Err(key string) error {
	v, ok := camErrors[key]
	if !ok {
		panic(fmt.Sprintf("unknown/unregistered error key %v", key))
	}
	return v
}
679516
func (g *Group) Err() *Statement {
	// notest
	s := Err()
	g.items = append(g.items, s)
	return s
}
636614
func (rs *Rows) Err() error {
	if rs.lasterr == io.EOF {
		return nil
	}
	return rs.lasterr
}
733700
func (c *Cursor) Err() error {
	if c == nil {
		return errNilCursor
	}

	c.mu.RLock()
	defer c.mu.RUnlock()

	return c.lastErr
}
990560
func Err(exit int, err error, format string, a ...interface{}) {
	format = fmt.Sprintf("[%s] %s", progname, format)
	format += ": %v\n"
	a = append(a, err)
	fmt.Fprintf(os.Stderr, format, a...)
	os.Exit(exit)
}
1087291
func Error(err error) *string {
	if err == nil {
		return nil
	}
	str := err.Error()
	return &str
}
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)
}
601393
func (scope *Scope) Err(err error) error {
	if err != nil {
		scope.db.AddError(err)
	}
	return err
}
1246979
func (parser *Parser) err() error {
	if parser.tokenError() {
		token := parser.nextToken()
		return fmt.Errorf("Tokenizer error: %s", token.String())
	}

	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
}
603237
func (is *Is) Err(e error) {
	is.TB.Helper()
	if isNil(e) {
		fail(is, "expected error")
	}
}
335526
func (c *Conn) Err() error {
	if c.ErrMock == nil {
		return nil
	}

	return c.ErrMock()
}
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
}