aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-08 19:24:29 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-08 19:24:29 +0200
commitdfa2f77d2e1118f32771c2fceefd683435554b9d (patch)
tree36502a51878f50cf01246fdb40e5a5f71d819d75 /src/libutil/util.cc
parente0a947cde6d11b5182500f024719b04b8997189a (diff)
If a .drv cannot be parsed, show its path
Otherwise you just get ‘expected string `Derive(['’ which isn't very helpful.
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r--src/libutil/util.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 15c462ce4..846674a29 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -1041,7 +1041,7 @@ void expect(std::istream & str, const string & s)
char s2[s.size()];
str.read(s2, s.size());
if (string(s2, s.size()) != s)
- throw Error(format("expected string `%1%'") % s);
+ throw FormatError(format("expected string `%1%'") % s);
}