From dfa2f77d2e1118f32771c2fceefd683435554b9d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 8 Apr 2014 19:24:29 +0200 Subject: If a .drv cannot be parsed, show its path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise you just get ‘expected string `Derive(['’ which isn't very helpful. --- src/libutil/util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libutil/util.cc') diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 15c462ce4e5b..846674a29d95 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); } -- cgit 1.4.1