ianmcook commented on a change in pull request #9899:
URL: https://github.com/apache/arrow/pull/9899#discussion_r607445520



##########
File path: r/R/util.R
##########
@@ -86,3 +86,11 @@ all_names <- function(expr) {
 is_constant <- function(expr) {
   length(all_vars(expr)) == 0
 }
+
+handle_embedded_nul_error <- function(e) {
+  msg <- conditionMessage(e)
+  if (grepl(" nul ", msg)) {
+    e$message <- paste0(msg, "; to strip nuls when converting from Arrow to R, 
set options(arrow.skip_nul = TRUE)")
+  }
+  stop(e)
+}

Review comment:
       Is the call info in the error message at all informative? If not, you 
might want `stop(msg, call. = FALSE)` inside the conditional (after appending 
to the message of course).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to