mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 23:07:46 +02:00
Convert more ShellError variants to named fields (#11222)
# Description Convert errors to named fields: * NeedsPositiveValue * MissingConfigValue * UnsupportedConfigValue * DowncastNotPossible * NonUtf8Custom * NonUtf8 * DidYouMeanCustom * DidYouMean * ReadingFile * RemoveNotPossible * ChangedModifiedTimeNotPossible * ChangedAccessTimeNotPossible Part of #10700
This commit is contained in:
@ -302,16 +302,16 @@ impl UrlComponents {
|
||||
return Ok(true);
|
||||
}
|
||||
match key {
|
||||
"host" => Err(ShellError::UnsupportedConfigValue(
|
||||
"non-empty string".into(),
|
||||
"empty string".into(),
|
||||
value_span,
|
||||
)),
|
||||
"scheme" => Err(ShellError::UnsupportedConfigValue(
|
||||
"non-empty string".into(),
|
||||
"empty string".into(),
|
||||
value_span,
|
||||
)),
|
||||
"host" => Err(ShellError::UnsupportedConfigValue {
|
||||
expected: "non-empty string".into(),
|
||||
value: "empty string".into(),
|
||||
span: value_span,
|
||||
}),
|
||||
"scheme" => Err(ShellError::UnsupportedConfigValue {
|
||||
expected: "non-empty string".into(),
|
||||
value: "empty string".into(),
|
||||
span: value_span,
|
||||
}),
|
||||
_ => Ok(false),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user