mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +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
|
@ -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