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

Unified Diff: common/config/impl/filesystem/fs.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 | « client/isolate/utils.go ('k') | common/config/impl/filesystem/paths.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/config/impl/filesystem/fs.go
diff --git a/common/config/impl/filesystem/fs.go b/common/config/impl/filesystem/fs.go
index 4bcf6cd1f19537f4c66e45ba5d1fea24531ce36a..e23ac806d45d69c9d4666821ef369f13b245b2f6 100644
--- a/common/config/impl/filesystem/fs.go
+++ b/common/config/impl/filesystem/fs.go
@@ -185,16 +185,13 @@ func New(basePath string) (config.Interface, error) {
return nil, err
}
if !inf.IsDir() {
- return nil, (errors.Reason("filesystem.New(%(basePath)q): does not link to a directory").
- D("basePath", basePath).Err())
+ return nil, errors.Reason("filesystem.New(%q): does not link to a directory", basePath).Err()
}
if len(ret.basePath.explode()) < 1 {
- return nil, (errors.Reason("filesystem.New(%(basePath)q): not enough tokens in path").
- D("basePath", basePath).Err())
+ return nil, errors.Reason("filesystem.New(%q): not enough tokens in path", basePath).Err()
}
} else if !inf.IsDir() {
- return nil, (errors.Reason("filesystem.New(%(basePath)q): not a directory").
- D("basePath", basePath).Err())
+ return nil, errors.Reason("filesystem.New(%q): not a directory", basePath).Err()
}
return ret, nil
}
« no previous file with comments | « client/isolate/utils.go ('k') | common/config/impl/filesystem/paths.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698