about summary refs log tree commit diff
path: root/src/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/util.cc2
-rw-r--r--src/libutil/util.hh2
2 files changed, 3 insertions, 1 deletions
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);
 }
 
 
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index 8bedfea9a0de..ce2d77c19a42 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -326,6 +326,8 @@ bool hasSuffix(const string & s, const string & suffix);
 /* Read string `s' from stream `str'. */
 void expect(std::istream & str, const string & s);
 
+MakeError(FormatError, Error)
+
 
 /* Read a C-style string from stream `str'. */
 string parseString(std::istream & str);