mirror of
https://github.com/NixOS/nix.git
synced 2025-11-12 21:46:01 +01:00
Merge pull request #4967 from Pamplemousse/specific_errors
Prefer to throw specific errors
This commit is contained in:
commit
f9d72855ae
4 changed files with 6 additions and 6 deletions
|
|
@ -32,7 +32,7 @@ ParsedURL parseURL(const std::string & url)
|
|||
auto isFile = scheme.find("file") != std::string::npos;
|
||||
|
||||
if (authority && *authority != "" && isFile)
|
||||
throw Error("file:// URL '%s' has unexpected authority '%s'",
|
||||
throw BadURL("file:// URL '%s' has unexpected authority '%s'",
|
||||
url, *authority);
|
||||
|
||||
if (isFile && path.empty())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue