Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/libcmd/repl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ StringSet NixRepl::completePrefix(const std::string & prefix)
// Quietly ignore evaluation errors.
} catch (BadURL & e) {
// Quietly ignore BadURL flake-related errors.
} catch (FileNotFound & e) {
// Quietly ignore non-existent file beeing `import`-ed.
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/libutil/source-accessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ SourceAccessor::Stat SourceAccessor::lstat(const CanonPath & path)
if (auto st = maybeLstat(path))
return *st;
else
throw Error("path '%s' does not exist", showPath(path));
throw FileNotFound("path '%s' does not exist", showPath(path));
}

void SourceAccessor::setPathDisplay(std::string displayPrefix, std::string displaySuffix)
Expand Down
2 changes: 2 additions & 0 deletions src/libutil/source-accessor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ enum class SymlinkResolution {
Full,
};

MakeError(FileNotFound, Error);

/**
* A read-only filesystem abstraction. This is used by the Nix
* evaluator and elsewhere for accessing sources in various
Expand Down