nushell/crates/nu-protocol/src
Stefan Holderbach f7b8f97873
Document and critically review ShellError variants - Ep. 2 (#8326)
Continuation of #8229 

# Description

The `ShellError` enum at the moment is kind of messy. 

Many variants are basic tuple structs where you always have to reference
the implementation with its macro invocation to know which field serves
which purpose.
Furthermore we have both variants that are kind of redundant or either
overly broad to be useful for the user to match on or overly specific
with few uses.

So I set out to start fixing the lacking documentation and naming to
make it feasible to critically review the individual usages and fix
those.
Furthermore we can decide to join or split up variants that don't seem
to be fit for purpose.

**Everyone:** Feel free to add review comments if you spot inconsistent
use of `ShellError` variants.

- Name fields of `SE::IncorrectValue`
- Merge and name fields on `SE::TypeMismatch`
- Name fields on `SE::UnsupportedOperator`
- Name fields on `AssignmentRequires*` and fix doc
- Name fields on `SE::UnknownOperator`
- Name fields on `SE::MissingParameter`
- Name fields on `SE::DelimiterError`
- Name fields on `SE::IncompatibleParametersSingle`

# User-Facing Changes

(None now, end goal more explicit and consistent error messages)

# Tests + Formatting

(No additional tests needed so far)
2023-03-06 11:31:07 +01:00
..
ast explain command (#7957) 2023-02-09 13:59:38 -06:00
engine Re-implement aliases (#8123) 2023-02-27 20:44:05 +13:00
value Document and critically review ShellError variants - Ep. 2 (#8326) 2023-03-06 11:31:07 +01:00
alias.rs Re-implement aliases (#8123) 2023-02-27 20:44:05 +13:00
cli_error.rs Clippy fix for Rust 1.63 (#6299) 2022-08-11 11:54:54 -05:00
config.rs Display empty records and lists (#7925) 2023-02-22 16:18:33 +00:00
example.rs Make plugin commands support examples. (#7984) 2023-02-08 16:14:18 -06:00
exportable.rs Removes export env command (#6468) 2022-09-25 19:52:43 +03:00
id.rs Overlays (#5375) 2022-05-08 07:39:22 +12:00
lev_distance.rs Reduce again the number of match calls (#7815) 2023-01-24 12:23:42 +01:00
lib.rs Re-implement aliases (#8123) 2023-02-27 20:44:05 +13:00
module.rs Allow main command to define top-level module command (#7764) 2023-01-22 21:34:15 +02:00
pipeline_data.rs Document and critically review ShellError variants - Ep. 2 (#8326) 2023-03-06 11:31:07 +01:00
plugin_signature.rs Make plugin commands support examples. (#7984) 2023-02-08 16:14:18 -06:00
shell_error.rs Document and critically review ShellError variants - Ep. 2 (#8326) 2023-03-06 11:31:07 +01:00
signature.rs view span & view files commands (#7989) 2023-02-09 11:35:23 -06:00
span.rs Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
syntax_shape.rs Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
ty.rs Display empty records and lists (#7925) 2023-02-22 16:18:33 +00:00
util.rs move BufferedReader out of nu-command (#7697) 2023-01-06 15:22:17 -08:00
variable.rs Limited mutable variables (#7089) 2022-11-11 19:51:08 +13:00