about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-06-07T13·10+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-06-07T13·10+0200
commitca70fba0bff82465a14ca0d29266b609851a6547 (patch)
treef28962b5c0ceee321f8ed8d61cbc1dc0e4b69358 /src
parent5959c591a0a6000b6de14eaec37e8139e36dfe0a (diff)
Remove obsolete EOF checks
Diffstat (limited to 'src')
-rw-r--r--src/libstore/local-store.cc44
1 files changed, 18 insertions, 26 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 056247b7e9..b44e025b5b 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -1122,13 +1122,9 @@ PathSet LocalStore::querySubstitutablePaths(const PathSet & paths)
                substituters should only write (short) messages to
                stderr when they fail.  I.e. they shouldn't write debug
                output. */
-            try {
-                Path path = getLineFromSubstituter(run);
-                if (path == "") break;
-                res.insert(path);
-            } catch (EndOfFile e) {
-                throw Error(format("substituter `%1%' failed: %2%") % *i % chomp(drainFD(run.error)));
-            }
+            Path path = getLineFromSubstituter(run);
+            if (path == "") break;
+            res.insert(path);
         }
     }
     return res;
@@ -1147,26 +1143,22 @@ void LocalStore::querySubstitutablePathInfos(const Path & substituter,
     writeLine(run.to, s);
 
     while (true) {
-        try {
-            Path path = getLineFromSubstituter(run);
-            if (path == "") break;
-            if (paths.find(path) == paths.end())
-                throw Error(format("got unexpected path `%1%' from substituter") % path);
-            paths.erase(path);
-            SubstitutablePathInfo & info(infos[path]);
-            info.deriver = getLineFromSubstituter(run);
-            if (info.deriver != "") assertStorePath(info.deriver);
-            int nrRefs = getIntLineFromSubstituter<int>(run);
-            while (nrRefs--) {
-                Path p = getLineFromSubstituter(run);
-                assertStorePath(p);
-                info.references.insert(p);
-            }
-            info.downloadSize = getIntLineFromSubstituter<long long>(run);
-            info.narSize = getIntLineFromSubstituter<long long>(run);
-        } catch (EndOfFile e) {
-            throw Error(format("substituter `%1%' failed: %2%") % substituter % chomp(drainFD(run.error)));
+        Path path = getLineFromSubstituter(run);
+        if (path == "") break;
+        if (paths.find(path) == paths.end())
+            throw Error(format("got unexpected path `%1%' from substituter") % path);
+        paths.erase(path);
+        SubstitutablePathInfo & info(infos[path]);
+        info.deriver = getLineFromSubstituter(run);
+        if (info.deriver != "") assertStorePath(info.deriver);
+        int nrRefs = getIntLineFromSubstituter<int>(run);
+        while (nrRefs--) {
+            Path p = getLineFromSubstituter(run);
+            assertStorePath(p);
+            info.references.insert(p);
         }
+        info.downloadSize = getIntLineFromSubstituter<long long>(run);
+        info.narSize = getIntLineFromSubstituter<long long>(run);
     }
 }