Skip to content

Commit 9b42762

Browse files
committed
Use tryCatch() correctly
1 parent bbac39d commit 9b42762

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

R/extractObservationData.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extractObservationData <- function(
1515
dbg = dbg
1616
)
1717
},
18-
error = {
18+
error = function(e) {
1919
do.call(extractObservationData_2, c(dot.args, list(
2020
text = text,
2121
headerInfo = getHeaderInfo(text),

R/readObservationsFromCsvText.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ readObservationsFromCsvText <- function(
3636
utils::read.table, c(common_args, list(colClasses = colClasses))
3737
),
3838
silent = TRUE,
39-
error = {
39+
error = function(e) {
4040
data <- do.call(utils::read.table, c(common_args, list(colClasses = NA)))
4141
convertTypes(data, dbg = dbg, classes = sapply(
4242
X = get_elements(inspectionDataFieldCodes(), names(data)),

0 commit comments

Comments
 (0)