mirror of
https://github.com/nushell/nushell.git
synced 2025-06-20 18:08:36 +02:00
rewrite error message to not use the word function
(#14533)
# Description After [the discussion on discord](https://discord.com/channels/601130461678272522/601130461678272524/1314600410882904125) I propose to rephrase the error message to avoid using the word `function`. From `Return used outside of function` to `Return used outside of custom command or closure`  # User-Facing Changes None # Tests + Formatting toolkit.nu fmt is good
This commit is contained in:
parent
8771872d86
commit
9411458689
@ -1220,10 +1220,10 @@ pub enum ShellError {
|
|||||||
span: Span,
|
span: Span,
|
||||||
},
|
},
|
||||||
|
|
||||||
/// Return event, which may become an error if used outside of a function
|
/// Return event, which may become an error if used outside of a custom command or closure
|
||||||
#[error("Return used outside of function")]
|
#[error("Return used outside of custom command or closure")]
|
||||||
Return {
|
Return {
|
||||||
#[label("used outside of function")]
|
#[label("used outside of custom command or closure")]
|
||||||
span: Span,
|
span: Span,
|
||||||
value: Box<Value>,
|
value: Box<Value>,
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user