about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/rpc-store.hh
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-08-08T19·07-0400
committerglittershark <grfn@gws.fyi>2020-08-09T01·17+0000
commitef7894273bde96f6fc3523caa93f1e4a4ad64e43 (patch)
tree46812945ae65115bc0332047eca71e8f8183853f /third_party/nix/src/libstore/rpc-store.hh
parent1de00e6c42ee6beaaa490104888ef09be1d4a0d4 (diff)
feat(tvix): Pass function name to SuccessOrThrow r/1620
To aid in debugging RPC call failures, pass the name of the function
being called to the SuccessOrThrow util funcion in the RpcStore

Change-Id: I523dacfab896b85a3dbe6050c07ee6bd5906fa44
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1690
Tested-by: BuildkiteCI
Reviewed-by: kanepyork <rikingcoding@gmail.com>
Diffstat (limited to 'third_party/nix/src/libstore/rpc-store.hh')
-rw-r--r--third_party/nix/src/libstore/rpc-store.hh5
1 files changed, 4 insertions, 1 deletions
diff --git a/third_party/nix/src/libstore/rpc-store.hh b/third_party/nix/src/libstore/rpc-store.hh
index dd421caf44c4..c400b8f3976a 100644
--- a/third_party/nix/src/libstore/rpc-store.hh
+++ b/third_party/nix/src/libstore/rpc-store.hh
@@ -1,5 +1,7 @@
 #pragma once
 
+#include <absl/strings/string_view.h>
+
 #include "libproto/worker.grpc.pb.h"
 #include "libproto/worker.pb.h"
 #include "libstore/remote-store.hh"
@@ -132,7 +134,8 @@ class RpcStore : public LocalFSStore, public virtual Store {
   std::optional<std::string> uri_;
   std::unique_ptr<nix::proto::WorkerService::Stub> stub_;
 
-  void const SuccessOrThrow(const grpc::Status& status) const;
+  void const SuccessOrThrow(const grpc::Status& status,
+                            const absl::string_view& call = "") const;
 };
 
 }  // namespace nix::store