Switch panics for not implemented store RPCS to return errors.
Previously got an "response header" ipc related issue. This will make it clearer what is going on.
Change-Id: I1a4e8f4027146c5c3fcb12a2e7e97db375876721
diff --git a/services/store/memstore/object.go b/services/store/memstore/object.go
index a0ac078..f130c7d 100644
--- a/services/store/memstore/object.go
+++ b/services/store/memstore/object.go
@@ -7,6 +7,7 @@
"veyron2/query"
"veyron2/security"
"veyron2/storage"
+ "veyron2/verror"
)
// object is a binding to a store value. This is currently represented as a
@@ -88,12 +89,12 @@
// replication groups. Attributes are associated with the value, not the
// path.
func (o *object) SetAttr(pid security.PublicID, tr service.Transaction, attrs ...storage.Attr) error {
- panic("not implemented")
+ return verror.Internalf("SetAttr not yet implemented")
}
// Stat returns entry info.
func (o *object) Stat(pid security.PublicID, tr service.Transaction) (*storage.Stat, error) {
- panic("not implemented")
+ return nil, verror.Internalf("Stat not yet implemented")
}
// Query returns entries matching the given query.
diff --git a/services/store/server/object.go b/services/store/server/object.go
index 96c099f..4063809 100644
--- a/services/store/server/object.go
+++ b/services/store/server/object.go
@@ -12,6 +12,7 @@
"veyron2/services/watch"
"veyron2/storage"
"veyron2/vdl"
+ "veyron2/verror"
)
type object struct {
@@ -216,5 +217,5 @@
// Watch returns a stream of changes.
func (o *object) Watch(ctx ipc.ServerContext, req watch.Request, stream watch.WatcherServiceWatchStream) error {
- panic("not implemented")
+ return verror.Internalf("Watch not yet implemented")
}
diff --git a/services/store/server/server.go b/services/store/server/server.go
index 9cad680..0404187 100644
--- a/services/store/server/server.go
+++ b/services/store/server/server.go
@@ -18,6 +18,7 @@
"veyron2/services/store"
"veyron2/services/watch"
"veyron2/vdl"
+ "veyron2/verror"
)
const (
@@ -263,7 +264,7 @@
// ReadConflicts returns the stream of conflicts to store values. A
// conflict occurs when there is a concurrent modification to a value.
func (s *Server) ReadConflicts(_ ipc.ServerContext, stream store.StoreServiceReadConflictsStream) error {
- panic("not implemented")
+ return verror.Internalf("ReadConflicts not yet implemented")
}
type storeDispatcher struct {