Add name to some error messages
This commit is contained in:
parent
753fc1661d
commit
e514b3939a
|
@ -408,8 +408,8 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
|
||||||
return std::visit(overloaded {
|
return std::visit(overloaded {
|
||||||
[&](const TextIngestionMethod &) {
|
[&](const TextIngestionMethod &) {
|
||||||
if (hashType != htSHA256)
|
if (hashType != htSHA256)
|
||||||
throw UnimplementedError("Only SHA-256 is supported for adding text-hashed data, but '%1' was given",
|
throw UnimplementedError("When adding text-hashed data called '%s', only SHA-256 is supported but '%s' was given",
|
||||||
printHashType(hashType));
|
name, printHashType(hashType));
|
||||||
// We could stream this by changing Store
|
// We could stream this by changing Store
|
||||||
std::string contents = source.drain();
|
std::string contents = source.drain();
|
||||||
auto path = store->addTextToStore(name, contents, refs, repair);
|
auto path = store->addTextToStore(name, contents, refs, repair);
|
||||||
|
|
|
@ -631,8 +631,8 @@ ref<const ValidPathInfo> RemoteStore::addCAToStore(
|
||||||
std::visit(overloaded {
|
std::visit(overloaded {
|
||||||
[&](const TextIngestionMethod & thm) -> void {
|
[&](const TextIngestionMethod & thm) -> void {
|
||||||
if (hashType != htSHA256)
|
if (hashType != htSHA256)
|
||||||
throw UnimplementedError("Only SHA-256 is supported for adding text-hashed data, but '%1' was given",
|
throw UnimplementedError("When adding text-hashed data called '%s', only SHA-256 is supported but '%s' was given",
|
||||||
printHashType(hashType));
|
name, printHashType(hashType));
|
||||||
std::string s = dump.drain();
|
std::string s = dump.drain();
|
||||||
conn->to << wopAddTextToStore << name << s;
|
conn->to << wopAddTextToStore << name << s;
|
||||||
worker_proto::write(*this, conn->to, references);
|
worker_proto::write(*this, conn->to, references);
|
||||||
|
|
Loading…
Reference in a new issue