diff options
author | Mark H Weaver <mhw@netris.org> | 2015-01-06 12:57:15 -0500 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2015-01-06 12:57:15 -0500 |
commit | 23800e47361304682914314b99cfd4f3926f28e3 (patch) | |
tree | e67d984ab5961a81c8b8c6396c79cb218fecda85 /nix/libutil | |
parent | 9b1bf33081652210502c6ef34506e27a9bc60f06 (diff) | |
parent | aebb05b09502be00fb121f9c6cd74a190fb12a1c (diff) | |
download | patches-23800e47361304682914314b99cfd4f3926f28e3.tar patches-23800e47361304682914314b99cfd4f3926f28e3.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'nix/libutil')
-rw-r--r-- | nix/libutil/archive.cc | 2 | ||||
-rw-r--r-- | nix/libutil/util.cc | 2 | ||||
-rw-r--r-- | nix/libutil/util.hh | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/nix/libutil/archive.cc b/nix/libutil/archive.cc index ab4cd47351..70a1c580dd 100644 --- a/nix/libutil/archive.cc +++ b/nix/libutil/archive.cc @@ -104,7 +104,7 @@ static void dump(const Path & path, Sink & sink, PathFilter & filter) writeString(readLink(path), sink); } - else throw Error(format("file `%1%' has an unknown type") % path); + else throw Error(format("file `%1%' has an unsupported type") % path); writeString(")", sink); } diff --git a/nix/libutil/util.cc b/nix/libutil/util.cc index 15c462ce4e..846674a29d 100644 --- a/nix/libutil/util.cc +++ b/nix/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/nix/libutil/util.hh b/nix/libutil/util.hh index 8bedfea9a0..ce2d77c19a 100644 --- a/nix/libutil/util.hh +++ b/nix/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); |