thisisnic commented on code in PR #34798:
URL: https://github.com/apache/arrow/pull/34798#discussion_r1154484714


##########
r/R/csv.R:
##########
@@ -782,12 +782,16 @@ write_csv_arrow <- function(x,
     tryCatch(
       x <- as_record_batch_reader(x),
       error = function(e) {
-        abort(
-          paste0(
-            "x must be an object of class 'data.frame', 'RecordBatch', ",
-            "'Dataset', 'Table', or 'RecordBatchReader' not '", class(x)[1], 
"'."
+        if (grepl("Input data frame columns must be named", 
conditionMessage(e))) {
+          abort(conditionMessage(e), parent = NA)

Review Comment:
   I can see your objections to the way it's being handled there, but that code 
was already before, and the scope of this PR was just to add in the improved 
error messaging in specific circumstances, which has been achieved.  Good call 
opening a new ticket, I think that makes the most sense here.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to