mirror of
https://github.com/nushell/nushell
synced 2024-12-28 05:53:09 +00:00
error message cleanup for into string (#3488)
This commit is contained in:
parent
5fcc7f2328
commit
ac38ee82f4
1 changed files with 7 additions and 7 deletions
|
@ -142,20 +142,20 @@ pub fn action(
|
|||
}
|
||||
Primitive::Nothing => "nothing".to_string(),
|
||||
_ => {
|
||||
return Err(ShellError::unimplemented(
|
||||
"str from for non-numeric primitives",
|
||||
))
|
||||
return Err(ShellError::unimplemented(&format!(
|
||||
"into string for primitive: {:?}",
|
||||
prim
|
||||
)))
|
||||
}
|
||||
})
|
||||
.into_value(tag)),
|
||||
UntaggedValue::Row(_) => Err(ShellError::labeled_error(
|
||||
"specify column to use 'str from'",
|
||||
"specify column to use 'into string'",
|
||||
"found table",
|
||||
input.tag.clone(),
|
||||
)),
|
||||
_ => Err(ShellError::unimplemented(
|
||||
"str from for non-primitive, non-table types",
|
||||
)),
|
||||
UntaggedValue::Table(_) => Err(ShellError::unimplemented("into string for table")),
|
||||
_ => Err(ShellError::unimplemented("into string for non-primitive")),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue