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

Unified Diff: impl/memory/error_markers.go

Issue 1302813003: impl/memory: Implement Queries (Closed) Base URL: https://github.com/luci/gae.git@add_multi_iterator
Patch Set: stringSet everywhere 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « impl/memory/doc.go ('k') | impl/memory/gkvlite_iter.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/error_markers.go
diff --git a/impl/memory/error_markers.go b/impl/memory/error_markers.go
new file mode 100644
index 0000000000000000000000000000000000000000..2c40fd7e8c338bdc96a48225807b6730aa2858d7
--- /dev/null
+++ b/impl/memory/error_markers.go
@@ -0,0 +1,21 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package memory
+
+// memoryCorruption is a marker function to indicate that given error is
+// actually due to corrupted memory to make it easier to read the code.
+func memoryCorruption(err error) {
+ if err != nil {
+ panic(err)
+ }
+}
+
+// impossible is a marker function to indicate that the given error is an
+// impossible state, due to conditions outside of the function.
+func impossible(err error) {
+ if err != nil {
+ panic(err)
+ }
+}
« no previous file with comments | « impl/memory/doc.go ('k') | impl/memory/gkvlite_iter.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698