mirror of
https://github.com/NixOS/nix
synced 2025-06-28 01:11:15 +02:00
more debug_throw coverage of EvalErrors
This commit is contained in:
parent
3d94d3ba91
commit
eaecaaa00b
5 changed files with 35 additions and 30 deletions
|
@ -783,13 +783,14 @@ Path EvalState::findFile(SearchPath & searchPath, const std::string_view path, c
|
|||
if (hasPrefix(path, "nix/"))
|
||||
return concatStrings(corepkgsPrefix, path.substr(4));
|
||||
|
||||
throw ThrownError({
|
||||
debug_throw(ThrownError({
|
||||
.msg = hintfmt(evalSettings.pureEval
|
||||
? "cannot look up '<%s>' in pure evaluation mode (use '--impure' to override)"
|
||||
: "file '%s' was not found in the Nix search path (add it using $NIX_PATH or -I)",
|
||||
path),
|
||||
.errPos = pos
|
||||
});
|
||||
}));
|
||||
return Path(); // should never execute due to debug_throw above.
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue