guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

13/30: daemon: Print the line whence we expect an integer.


From: guix-commits
Subject: 13/30: daemon: Print the line whence we expect an integer.
Date: Fri, 26 Nov 2021 18:53:08 -0500 (EST)

nckx pushed a commit to branch master
in repository guix.

commit 1b1f557d888fa84b1bc818f1b221776355a7a2dd
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Fri Nov 19 17:37:44 2021 +0100

    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(-)

diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc
index d52b102..0883a4b 100644
--- a/nix/libstore/local-store.cc
+++ b/nix/libstore/local-store.cc
@@ -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;
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]