nushell/crates/nu-parser/src
Stefan Holderbach 62575c9a4f
Document and critically review ShellError variants - Ep. 3 (#8340)
Continuation of #8229 and #8326

# 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.

# Call to action

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

# User-Facing Changes

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

# Tests + Formatting

(No additional tests needed so far)

# Commits (so far)

- Remove `ShellError::FeatureNotEnabled`
- Name fields on `SE::ExternalNotSupported`
- Name field on `SE::InvalidProbability`
- Name fields on `SE::NushellFailed` variants
- Remove unused `SE::NushellFailedSpannedHelp`
- Name field on `SE::VariableNotFoundAtRuntime`
- Name fields on `SE::EnvVarNotFoundAtRuntime`
- Name fields on `SE::ModuleNotFoundAtRuntime`
- Remove usused `ModuleOrOverlayNotFoundAtRuntime`
- Name fields on `SE::OverlayNotFoundAtRuntime`
- Name field on `SE::NotFound`
2023-03-06 18:33:09 +01:00
..
deparse.rs Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
errors.rs fix NotAConstant error help message (#8293) 2023-03-02 19:07:25 -06:00
eval.rs Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
flatten.rs Support redirect err and out to different streams (#7685) 2023-01-12 10:22:30 +01:00
known_external.rs Document and critically review ShellError variants - Ep. 3 (#8340) 2023-03-06 18:33:09 +01:00
lex.rs fix: fix lexing of comments, such that a#b becomes a coherent Item (#8151) 2023-02-22 12:59:47 +00:00
lib.rs Small parser refactors (#7568) 2022-12-22 13:41:44 +02:00
lite_parser.rs Fix multi-line redirection inside a block (#7808) 2023-01-23 06:32:56 +13:00
parse_keywords.rs Re-implement aliases (#8123) 2023-02-27 20:44:05 +13:00
parser.rs Re-implement aliases (#8123) 2023-02-27 20:44:05 +13:00
type_check.rs fix: allow subtraction of durations from dates (#8247) 2023-02-27 21:17:58 +01:00