forked from extern/nushell
error message cleanup for into string (#3488)
This commit is contained in:
parent
5fcc7f2328
commit
ac38ee82f4
@ -142,20 +142,20 @@ pub fn action(
|
|||||||
}
|
}
|
||||||
Primitive::Nothing => "nothing".to_string(),
|
Primitive::Nothing => "nothing".to_string(),
|
||||||
_ => {
|
_ => {
|
||||||
return Err(ShellError::unimplemented(
|
return Err(ShellError::unimplemented(&format!(
|
||||||
"str from for non-numeric primitives",
|
"into string for primitive: {:?}",
|
||||||
))
|
prim
|
||||||
|
)))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.into_value(tag)),
|
.into_value(tag)),
|
||||||
UntaggedValue::Row(_) => Err(ShellError::labeled_error(
|
UntaggedValue::Row(_) => Err(ShellError::labeled_error(
|
||||||
"specify column to use 'str from'",
|
"specify column to use 'into string'",
|
||||||
"found table",
|
"found table",
|
||||||
input.tag.clone(),
|
input.tag.clone(),
|
||||||
)),
|
)),
|
||||||
_ => Err(ShellError::unimplemented(
|
UntaggedValue::Table(_) => Err(ShellError::unimplemented("into string for table")),
|
||||||
"str from for non-primitive, non-table types",
|
_ => Err(ShellError::unimplemented("into string for non-primitive")),
|
||||||
)),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user