forked from lix-project/lix
Better error message
This commit is contained in:
parent
5acb691402
commit
0dd988d2e3
|
@ -137,7 +137,12 @@ void BinaryCacheStore::narFromPath(const Path & storePath, Sink & sink)
|
||||||
|
|
||||||
/* Decompress the NAR. FIXME: would be nice to have the remote
|
/* Decompress the NAR. FIXME: would be nice to have the remote
|
||||||
side do this. */
|
side do this. */
|
||||||
nar = decompress(info->compression, ref<std::string>(nar));
|
try {
|
||||||
|
nar = decompress(info->compression, ref<std::string>(nar));
|
||||||
|
} catch (UnknownCompressionMethod &) {
|
||||||
|
throw Error(format("binary cache path ‘%s’ uses unknown compression method ‘%s’")
|
||||||
|
% storePath % info->compression);
|
||||||
|
}
|
||||||
|
|
||||||
stats.narReadBytes += nar->size();
|
stats.narReadBytes += nar->size();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue