From 4036185cb4bacbf6acaaa1a906924dfa2cdd9413 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 21 Sep 2016 16:00:03 +0200 Subject: Some notational convenience for formatting strings We can now write throw Error("file '%s' not found", path); instead of throw Error(format("file '%s' not found") % path); and similarly printError("file '%s' not found", path); instead of printMsg(lvlError, format("file '%s' not found") % path); --- src/libstore/remote-store.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstore/remote-store.cc') diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index 7b73557a5cae..5c9262deca96 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -564,7 +564,7 @@ void RemoteStore::Connection::processStderr(Sink * sink, Source * source) if (msg == STDERR_ERROR) { string error = readString(from); unsigned int status = readInt(from); - throw Error(format("%1%") % error, status); + throw Error(status, error); } else if (msg != STDERR_LAST) throw Error("protocol error processing standard error"); -- cgit 1.4.1