Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize error messages #223

Closed
kevinushey opened this issue Feb 9, 2017 · 5 comments

Comments

@kevinushey
Copy link
Contributor

commented Feb 9, 2017

E.g. given this example:

> tibble::as_data_frame(list(a = character(), b = 1))
Error: Variables must be length 1 or 1.
Problem variables: 'a'

I would suggest a warning message something like "Error: Can't mix zero-length variables with non-zero-length variables.", or just avoid duplication of the number 1 above.

@krlmlr

This comment has been minimized.

Copy link
Member

commented Apr 17, 2017

Yes, we should revise all error messages, like we did for dplyr.

@krlmlr krlmlr removed the bug label Apr 17, 2017

@krlmlr krlmlr changed the title Better warning when constructing data_frame w/list containing zero-length columns Standardize error messages Apr 17, 2017

@krlmlr

This comment has been minimized.

Copy link
Member

commented May 9, 2017

@hadley: I think we can release after fixing the error messages.

@hadley

This comment has been minimized.

Copy link
Member

commented May 10, 2017

Sounds good.

krlmlr added a commit that referenced this issue May 13, 2017

krlmlr added a commit that referenced this issue May 13, 2017

krlmlr added a commit that referenced this issue May 13, 2017

krlmlr added a commit that referenced this issue May 13, 2017

krlmlr added a commit that referenced this issue May 13, 2017

krlmlr added a commit that referenced this issue May 15, 2017

krlmlr added a commit that referenced this issue May 15, 2017

Merge branch 'f-#223-error-msg-early'
- Improve formatting of error messages (#223).

krlmlr added a commit that referenced this issue May 15, 2017

Merge tag 'v1.3.0.9009'
- Improve formatting of error messages (#223).

krlmlr added a commit that referenced this issue May 17, 2017

Merge tag 'v1.3.1'
- Subsetting zero columns no longer returns wrong number of rows (#241, @echasnovski).

- New `set_tidy_names()` and `tidy_names()`, a simpler version of `repair_names()` which works unchanged for now (#217).
- New `rowid_to_column()` that adds a `rowid` column as first column and removes row names (#243, @barnettjacob).
- The `all.equal.tbl_df()` method has been removed, calling `all.equal()` now forwards to `base::all.equal.data.frame()`. To compare tibbles ignoring row and column order, please use `dplyr::all_equal()` (#247).

- Printing now uses `x` again instead of the Unicode multiplication sign, to avoid encoding issues (#216).
- String values are now quoted when printing if they contain non-printable characters or quotes (#253).
- The `print()`, `format()`, and `tbl_sum()` methods are now implemented for class `"tbl"` and not for `"tbl_df"`. This allows subclasses to use tibble's formatting facilities. The formatting of the header can be tweaked by implementing `tbl_sum()` for the subclass, which is expected to return a named character vector. The `print.tbl_df()` method is still implemented for compatibility with downstream packages, but only calls `NextMethod()`.
- Own printing routine, not relying on `print.data.frame()` anymore. Now providing `format.tbl_df()` and full support for Unicode characters in names and data, also for `glimpse()` (#235).

- Improve formatting of error messages (#223).
- Using `rlang` instead of `lazyeval` (#225, @lionel-), and `rlang` functions (#244).
- `tribble()` now handles values that have a class (#237, @NikNakk).
- Minor efficiency gains by replacing `any(is.na())` with `anyNA()` (#229, @csgillespie).
- The `microbenchmark` package is now used conditionally (#245).
- `pkgdown` website.

krlmlr added a commit that referenced this issue Jul 27, 2017

@krlmlr

This comment has been minimized.

Copy link
Member

commented Jan 20, 2018

I'll do this right after releasing tibble to CRAN, because changed error messages may affect tests in downstream dependencies.

@hadley

This comment has been minimized.

Copy link
Member

commented Jan 21, 2018

Sounds good. We can now apply the style guide.

@krlmlr krlmlr closed this in #413 May 24, 2018

krlmlr added a commit that referenced this issue May 24, 2018

Merge pull request #413 from tidyverse/f-error
- All error messages now follow the tidyverse style guide (#223).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.