aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-05-09 13:24:53 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-05-09 13:24:53 -0400
commite514b3939adb087338a9ef7445afcecb0efb42b1 (patch)
treed5d4ca4afc192770d3020c76d4b3c9ddb71bc240 /src/libstore
parent753fc1661d9b5275ee7048353872f10bcd9c2953 (diff)
Add name to some error messages
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/daemon.cc4
-rw-r--r--src/libstore/remote-store.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc
index 31e2e2af5..5083497a9 100644
--- a/src/libstore/daemon.cc
+++ b/src/libstore/daemon.cc
@@ -408,8 +408,8 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
return std::visit(overloaded {
[&](const TextIngestionMethod &) {
if (hashType != htSHA256)
- throw UnimplementedError("Only SHA-256 is supported for adding text-hashed data, but '%1' was given",
- printHashType(hashType));
+ throw UnimplementedError("When adding text-hashed data called '%s', only SHA-256 is supported but '%s' was given",
+ name, printHashType(hashType));
// We could stream this by changing Store
std::string contents = source.drain();
auto path = store->addTextToStore(name, contents, refs, repair);
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index b3f5251f2..0ed17a6ce 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -631,8 +631,8 @@ ref<const ValidPathInfo> RemoteStore::addCAToStore(
std::visit(overloaded {
[&](const TextIngestionMethod & thm) -> void {
if (hashType != htSHA256)
- throw UnimplementedError("Only SHA-256 is supported for adding text-hashed data, but '%1' was given",
- printHashType(hashType));
+ throw UnimplementedError("When adding text-hashed data called '%s', only SHA-256 is supported but '%s' was given",
+ name, printHashType(hashType));
std::string s = dump.drain();
conn->to << wopAddTextToStore << name << s;
worker_proto::write(*this, conn->to, references);