Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Unified Diff: dm/tools/dmtool/vizQuery.go

Issue 2963503003: [errors] Greatly simplify common/errors package. (Closed)
Patch Set: fix nits Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dm/appengine/mutate/timeout_execution.go ('k') | grpc/grpcutil/errors.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/tools/dmtool/vizQuery.go
diff --git a/dm/tools/dmtool/vizQuery.go b/dm/tools/dmtool/vizQuery.go
index e12f431a191616688dbab79be920f700dd04ef04..6699430e0a001857fd36f1dae8fcc061071be04d 100644
--- a/dm/tools/dmtool/vizQuery.go
+++ b/dm/tools/dmtool/vizQuery.go
@@ -234,7 +234,7 @@ func (r *visQueryRun) Run(a subcommands.Application, args []string, env subcomma
for c.Err() == nil {
gdata, err := runQuery(c, dc, query)
if err != nil {
- if errors.Contains(err, context.Canceled) {
+ if errors.Any(err, func(err error) bool { return err == context.Canceled }) {
return 0
}
logging.WithError(err).Errorf(c, "error running query")
« no previous file with comments | « dm/appengine/mutate/timeout_execution.go ('k') | grpc/grpcutil/errors.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698