Merge pull request #337 from jonathandturner/cleanup_column_error

Clean up error text
This commit is contained in:
Jonathan Turner 2019-08-24 08:58:03 +12:00 committed by GitHub
commit 2663405115
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -38,8 +38,8 @@ fn get_member(path: &Tagged<String>, obj: &Tagged<Value>) -> Result<Tagged<Value
Some(v) => return Ok(v.clone()), Some(v) => return Ok(v.clone()),
None => { None => {
return Err(ShellError::labeled_error( return Err(ShellError::labeled_error(
"Unknown field", "Unknown column",
"object missing field", "table missing column",
path.span(), path.span(),
)); ));
} }

View file

@ -35,7 +35,7 @@ fn pick(
) -> Result<OutputStream, ShellError> { ) -> Result<OutputStream, ShellError> {
if fields.len() == 0 { if fields.len() == 0 {
return Err(ShellError::labeled_error( return Err(ShellError::labeled_error(
"Pick requires fields", "Pick requires columns to pick",
"needs parameter", "needs parameter",
name, name,
)); ));