Commit Graph

8 Commits

Author SHA1 Message Date
Robert Lin
2d98b0901f
trace, tracer, errors, observation: add devx to CODENOTIFY (#38897) 2022-07-18 18:19:13 +02:00
Indradhanush Gupta
089f53c5d8
lib/errors: Add new classifiedError type (#38671) 2022-07-13 16:22:28 +00:00
Keegan Carruthers-Smith
11a534cc78
lib: use any instead of interface{} (#35121)
Now that lib is on go1.18 we can use the type alias "any" instead of "interface{}".

Test Plan: cd lib && go test ./...
2022-05-09 14:55:38 +00:00
Camden Cheek
f2e2a244cd
ignore any context errors in code monitors (#35064) 2022-05-07 12:13:24 -04:00
Robert Lin
fe428b20e2
lib/errors: new MultiError error type and utilities (#31466)
Wholesale migration away from go-multierror into a custom multierror implementation that is fully compatible with cockroachdb/errors, prints all errors, can be introspected with Is, As, and friends, and more. The new MultiError type is only available as an interface.

Co-authored-by: Camden Cheek <camden@ccheek.com>
2022-02-18 11:07:02 -08:00
Camden Cheek
233a93abc6
Add helper predicates for HasType and Is (#30975)
This adds a couple of small helpers to make working with errors.Ignore a
little easier. Now, if you just want to ignore a certain error type,
instead of creating a function for it, you can just do something like
```
err = errors.Ignore(err, errors.IsPred(context.Canceled))
```
2022-02-10 16:47:46 +00:00
Camden Cheek
f5a2e023cb
Add errors.Ignore() (#30930)
This adds the new helper function `Ignore` to our `errors` package. This
allows us to ignore errors based on a given predicate function in a way
that takes into account aggregated errors in MultiError. It recursively
unwraps to multierrors an filters out all child errors that match the
predicate.
2022-02-09 16:15:45 -07:00
Eric Fritz
7148009913
errors: Introduce internal package (#30558) 2022-02-07 15:03:45 +00:00