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

Side by Side Diff: deploytool/cmd/luci_deploy/kubernetes.go

Issue 2963503003: [errors] Greatly simplify common/errors package. (Closed)
Patch Set: fix nits Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package main 5 package main
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "sort" 9 "sort"
10 10
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 x := t.exec("get", resource, "-o", "yaml") 432 x := t.exec("get", resource, "-o", "yaml")
433 switch rv, err := x.run(c); { 433 switch rv, err := x.run(c); {
434 case err != nil: 434 case err != nil:
435 return err 435 return err
436 436
437 case rv != 0: 437 case rv != 0:
438 return errKubeResourceNotFound 438 return errKubeResourceNotFound
439 439
440 default: 440 default:
441 if err := yaml.Unmarshal(x.stdout.Bytes(), obj); err != nil { 441 if err := yaml.Unmarshal(x.stdout.Bytes(), obj); err != nil {
442 » » » return errors.Annotate(err).Reason("failed to unmarshal YAML %(type)T").D("type", obj).Err() 442 » » » return errors.Annotate(err, "failed to unmarshal YAML %T ", obj).Err()
443 } 443 }
444 return nil 444 return nil
445 } 445 }
446 } 446 }
OLDNEW
« no previous file with comments | « deploytool/cmd/luci_deploy/deploy_container_engine.go ('k') | deploytool/cmd/luci_deploy/layout.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698