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

Side by Side Diff: service/rawdatastore/checkfilter.go

Issue 1269593002: Fix obviously broken error handling. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package rawdatastore 5 package rawdatastore
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 9
10 "github.com/luci/gae/service/info" 10 "github.com/luci/gae/service/info"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 for i, k := range keys { 63 for i, k := range keys {
64 if KeyIncomplete(k) { 64 if KeyIncomplete(k) {
65 k = NewKey(k.AppID(), k.Namespace(), k.Kind(), "", 1, k. Parent()) 65 k = NewKey(k.AppID(), k.Namespace(), k.Kind(), "", 1, k. Parent())
66 } 66 }
67 if !KeyValid(k, false, tcf.aid, tcf.ns) { 67 if !KeyValid(k, false, tcf.aid, tcf.ns) {
68 lme.Assign(i, ErrInvalidKey) 68 lme.Assign(i, ErrInvalidKey)
69 continue 69 continue
70 } 70 }
71 v := vals[i] 71 v := vals[i]
72 if v == nil { 72 if v == nil {
73 » » » if !lme.Assign(i, errors.New("rawdatastore: PutMulti got nil vals entry")) { 73 » » » lme.Assign(i, errors.New("rawdatastore: PutMulti got nil vals entry"))
74 » » » » lme.Assign(i, v.Problem()) 74 » » } else {
75 » » » } 75 » » » lme.Assign(i, v.Problem())
76 } 76 }
77 } 77 }
78 if me := lme.Get(); me != nil { 78 if me := lme.Get(); me != nil {
79 for _, err := range me.(errors.MultiError) { 79 for _, err := range me.(errors.MultiError) {
80 cb(nil, err) 80 cb(nil, err)
81 } 81 }
82 return nil 82 return nil
83 } 83 }
84 84
85 err := error(nil) 85 err := error(nil)
(...skipping 28 matching lines...) Expand all
114 } 114 }
115 return nil 115 return nil
116 } 116 }
117 return tcf.Interface.DeleteMulti(keys, cb) 117 return tcf.Interface.DeleteMulti(keys, cb)
118 } 118 }
119 119
120 func applyCheckFilter(c context.Context, i Interface) Interface { 120 func applyCheckFilter(c context.Context, i Interface) Interface {
121 inf := info.Get(c) 121 inf := info.Get(c)
122 return &checkFilter{i, inf.AppID(), inf.GetNamespace()} 122 return &checkFilter{i, inf.AppID(), inf.GetNamespace()}
123 } 123 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698