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

Unified Diff: service/rawdatastore/errors.go

Issue 1259593005: Add 'user friendly' datastore API. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: 100% coverage of new code Created 5 years, 5 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
Index: service/rawdatastore/errors.go
diff --git a/service/rawdatastore/errors.go b/service/rawdatastore/errors.go
deleted file mode 100644
index 6ab0b563733268fc66c6ed1833e8d21ab46c0869..0000000000000000000000000000000000000000
--- a/service/rawdatastore/errors.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// 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 rawdatastore
-
-import (
- "fmt"
- "reflect"
-
- "google.golang.org/appengine/datastore"
-)
-
-// These errors are returned by various rawdatastore.Interface methods.
-var (
- ErrInvalidEntityType = datastore.ErrInvalidEntityType
- ErrInvalidKey = datastore.ErrInvalidKey
- ErrNoSuchEntity = datastore.ErrNoSuchEntity
- ErrConcurrentTransaction = datastore.ErrConcurrentTransaction
- ErrQueryDone = datastore.Done
-
- // ErrMetaFieldUnset is returned from PropertyLoadSaver.{Get,Set}Meta
- // implementations when the specified meta key isn't set on the struct at
- // all.
- ErrMetaFieldUnset = fmt.Errorf("gae: meta field unset")
-)
-
-// ErrFieldMismatch is returned when a field is to be loaded into a different
-// type than the one it was stored from, or when a field is missing or
-// unexported in the destination struct.
-// StructType is the type of the struct pointed to by the destination argument
-// passed to Get or to Iterator.Next.
-type ErrFieldMismatch struct {
- StructType reflect.Type
- FieldName string
- Reason string
-}
-
-func (e *ErrFieldMismatch) Error() string {
- return fmt.Sprintf("gae: cannot load field %q into a %q: %s",
- e.FieldName, e.StructType, e.Reason)
-}

Powered by Google App Engine
This is Rietveld 408576698