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

Unified Diff: chrome/common/extensions/docs/server2/memcache_object_store.py

Issue 14188041: Devserver: catch ValueError in MemcacheObjectStore.SetMulti. This is being (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/server2/memcache_object_store.py
diff --git a/chrome/common/extensions/docs/server2/memcache_object_store.py b/chrome/common/extensions/docs/server2/memcache_object_store.py
index 76f1485066439fd3458cea96f6fb2ded32aff5f0..13a09932cebeb819f4a45c6cfb6107fbcca93fde 100644
--- a/chrome/common/extensions/docs/server2/memcache_object_store.py
+++ b/chrome/common/extensions/docs/server2/memcache_object_store.py
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import logging
+
from appengine_wrappers import memcache
from object_store import ObjectStore
@@ -17,7 +19,11 @@ class MemcacheObjectStore(ObjectStore):
self._namespace = namespace
def SetMulti(self, mapping):
- memcache.Client().set_multi_async(mapping, namespace=self._namespace)
+ try:
+ memcache.Client().set_multi_async(mapping, namespace=self._namespace)
+ except ValueError as e:
+ logging.error('Caught "ValueError: %s" when mapping keys %s' % (
+ e, mapping.keys()))
def GetMulti(self, keys):
rpc = memcache.Client().get_multi_async(keys, namespace=self._namespace)
« 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