mirror of
https://github.com/NixOS/nix.git
synced 2025-11-21 01:39:36 +01:00
errorinfo constructor test
This commit is contained in:
parent
2d0f766a77
commit
39ff80d031
4 changed files with 16 additions and 5 deletions
|
|
@ -284,7 +284,7 @@ void BinaryCacheStore::narFromPath(const StorePath & storePath, Sink & sink)
|
|||
try {
|
||||
getFile(info->url, *decompressor);
|
||||
} catch (NoSuchBinaryCacheFile & e) {
|
||||
throw SubstituteGone(e.what());
|
||||
throw SubstituteGone(e.info());
|
||||
}
|
||||
|
||||
decompressor->finish();
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ void RemoteStore::queryPathInfoUncached(const StorePath & path,
|
|||
} catch (Error & e) {
|
||||
// Ugly backwards compatibility hack.
|
||||
if (e.msg().find("is not valid") != std::string::npos)
|
||||
throw InvalidPath(e.what());
|
||||
throw InvalidPath(e.info());
|
||||
throw;
|
||||
}
|
||||
if (GET_PROTOCOL_MINOR(conn->daemonVersion) >= 17) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue