|
.checkTypos = function(err, ref) { |
|
if (grepl('object.*not found', err$message)) { |
|
used = gsub(".*object '([^']+)'.*", "\\1", err$message) |
|
found = agrep(used, ref, value=TRUE, ignore.case=TRUE, fixed=TRUE) |
|
if (length(found)) { |
|
stop("Object '", used, "' not found. Perhaps you intended ", brackify(found)) |
|
} else { |
|
stop("Object '", used, "' not found amongst ", brackify(ref)) |
|
} |
|
} else { |
|
stop(err$message, call.=FALSE) |
|
} |
|
} |
Not ideal. I think I have a decent workaround.
data.table/R/data.table.R
Lines 110 to 122 in 19c61c0
Not ideal. I think I have a decent workaround.