Skip to content

Commit 0bb82ce

Browse files
committed
Make error more general
1 parent 921701a commit 0bb82ce

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

r/R/util.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ handle_csv_read_error <- function(msg, call, schema) {
200200
msg <- c(
201201
msg,
202202
i = paste(
203-
"Column type was inferred as null because the first block of data",
204-
"contained only missing values. See `?csv_read_options` for how to",
205-
"set a smaller value."
203+
"If you have not specified the schema, this error may be due to the column type being",
204+
"inferred as `null` because the first block of data contained only missing values.",
205+
"See `?csv_read_options` for how to set a smaller value."
206206
)
207207
)
208208
abort(msg, call = call)

r/tests/testthat/test-dataset-csv.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,6 @@ test_that("more informative error when column inferred as null due to sparse dat
726726
read_options = csv_read_options(block_size = 100L)
727727
) |>
728728
collect(),
729-
"inferred as null"
729+
"column type inferred as"
730730
)
731731
})

0 commit comments

Comments
 (0)