From 66ea78b078a6bae9ad8d7b99a728463e61276d15 Mon Sep 17 00:00:00 2001 From: ok <59588824+jku20@users.noreply.github.com> Date: Fri, 9 Aug 2024 13:24:18 -0400 Subject: [PATCH] [fud2] update shell error message (#2260) The error message referenced an old function which no longer exists. This has been changed. --- fud2/fud-core/src/script/error.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fud2/fud-core/src/script/error.rs b/fud2/fud-core/src/script/error.rs index 2a803b4e4..4b8c00cc5 100644 --- a/fud2/fud-core/src/script/error.rs +++ b/fud2/fud-core/src/script/error.rs @@ -109,7 +109,10 @@ impl Display for RhaiSystemError { write!(f, "Unable to build two ops at once: trying to build `{new_name:?}` but already building `{old_name:?}`") } RhaiSystemErrorKind::NoOp => { - write!(f, "Unable to find current op being built. Consider calling start_op_stmts earlier in the program.") + write!( + f, + "Function may only be called within the body of an op." + ) } RhaiSystemErrorKind::NoDep(dep) => { write!(f, "Unable to find dep: `{dep:?}`. A call to `shell` with `{dep:?}` as an output must occur prior to this call.") @@ -124,7 +127,7 @@ impl Display for RhaiSystemError { write!(f, "Expected `shell`, got `shell_deps`. Ops may contain only one of `shell` or `shell_deps` calls, not calls to both") } RhaiSystemErrorKind::ExpectedShellDeps => { - write!(f, "Expected `shell_deps`, got shell. Ops may contain only one of `shell` or `shell_deps` calls, not calls to both") + write!(f, "Expected `shell_deps`, got `shell`. Ops may contain only one of `shell` or `shell_deps` calls, not calls to both") } } }