From 1b1f557d888fa84b1bc818f1b221776355a7a2dd Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Fri, 19 Nov 2021 17:37:44 +0100 Subject: 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. --- nix/libstore/local-store.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nix') diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc index d52b102343..0883a4bbce 100644 --- a/nix/libstore/local-store.cc +++ b/nix/libstore/local-store.cc @@ -839,7 +839,8 @@ template 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; } -- cgit v1.2.3