daemon: Print the line whence we expect an integer.

* nix/libstore/local-store.cc (LocalStore::getLineFromSubstituter):
Include the malformed substituter stream line in the error message.
This commit is contained in:
Tobias Geerinckx-Rice 2021-11-19 17:37:44 +01:00
parent 3887c1f3b3
commit 1b1f557d88
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -839,7 +839,8 @@ template<class T> T LocalStore::getIntLineFromSubstituter(Agent & run)
{
string s = getLineFromSubstituter(run);
T res;
if (!string2Int(s, res)) throw Error("integer expected from stream");
if (!string2Int(s, res))
throw Error(format("integer expected from stream: %1%") % s);
return res;
}