cockroach: Index | Files

package causer

import ""


Package Files


func Visit Uses

func Visit(err error, f func(error) bool) bool

Visit walks along the chain of errors until it encounters the first one that does not implement Causer. The visitor is invoked with each error visited until there are no more errors to visit or the visitor returns true (which is then the return value of Visit as well). Returns false when the visitor never returns true or if the initial error is nil. Calling this method on a cyclic error chain results in an infinite loop.

type Causer Uses

type Causer interface {
    Cause() error

A Causer is an error that wraps a causing error (which in turn could be another Causer). A Causer is usually constructed via errors.Wrap or Wrapf.

Package causer is imported by 3 packages. Updated 2019-07-16. Refresh now. Tools for package owners.