You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/04/06 02:42:50 UTC

[GitHub] [arrow] nealrichardson commented on a change in pull request #9899: ARROW-11478: [R] Consider ways to make arrow.skip_nul option more user-friendly

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



##########
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:
       I thought (though I could be remembering wrong) that when you call `stop()` on a caught `simpleError` class object, you just re-raise it and that preserves however the original source of the `stop()` had said `call.` or whatever options. I'll review/confirm tomorrow.




-- 
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:
users@infra.apache.org