mirror of
https://github.com/NixOS/nix
synced 2025-06-26 20:01:15 +02:00
Prefer to throw specific errors
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
This commit is contained in:
parent
decc14d4b7
commit
4a7a8b87cd
4 changed files with 6 additions and 6 deletions
|
@ -188,7 +188,7 @@ void MixProfile::updateProfile(const BuiltPaths & buildables)
|
|||
}
|
||||
|
||||
if (result.size() != 1)
|
||||
throw Error("'--profile' requires that the arguments produce a single store path, but there are %d", result.size());
|
||||
throw UsageError("'--profile' requires that the arguments produce a single store path, but there are %d", result.size());
|
||||
|
||||
updateProfile(result[0]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue