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

Unified Diff: vpython/python/python.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 | « vpython/python/interpreter.go ('k') | vpython/python/version.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vpython/python/python.go
diff --git a/vpython/python/python.go b/vpython/python/python.go
index 6855af280396ced93d7e62a186c2663dc67ea1fd..ca30b69dc13b1c10e78f06070d6b5cb1fd920918 100644
--- a/vpython/python/python.go
+++ b/vpython/python/python.go
@@ -104,7 +104,7 @@ func ParseCommandLine(args []string) (cmd CommandLine, err error) {
// Extract the flag Target. -f<lag>
r, l := utf8.DecodeRuneInString(flag)
if r == utf8.RuneError {
- err = errors.Reason("invalid rune in flag #%(index)d").D("index", i).Err()
+ err = errors.Reason("invalid rune in flag #%d", i).Err()
return
}
@@ -116,10 +116,7 @@ func ParseCommandLine(args []string) (cmd CommandLine, err error) {
}
if i >= len(args) {
- return "", errors.Reason("two-value flag -%(flag)c missing second value at %(index)d").
- D("flag", r).
- D("index", i).
- Err()
+ return "", errors.Reason("two-value flag -%c missing second value at %d", r, i).Err()
}
value := args[i]
« no previous file with comments | « vpython/python/interpreter.go ('k') | vpython/python/version.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698