diff --git a/src/commands/save.rs b/src/commands/save.rs index 48cfa1acc9..4aaac0b14f 100644 --- a/src/commands/save.rs +++ b/src/commands/save.rs @@ -19,8 +19,8 @@ macro_rules! process_string { } _ => { break $scope Err(ShellError::labeled_error( - "Save could not successfully save", - "unexpected data during save", + "Save requires string data", + "consider converting data to string (see `help commands`)", $name_tag, )); } @@ -214,9 +214,9 @@ fn save( match content { Ok(save_data) => match std::fs::write(full_path, save_data) { Ok(o) => o, - Err(e) => yield Err(ShellError::labeled_error(e.to_string(), "for command", name)), + Err(e) => yield Err(ShellError::labeled_error(e.to_string(), "IO error while saving", name)), }, - Err(e) => yield Err(ShellError::labeled_error(e.to_string(), "for command", name)), + Err(e) => yield Err(e), } };