[ 
https://issues.apache.org/jira/browse/ARROW-16769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17551392#comment-17551392
 ] 

Weston Pace commented on ARROW-16769:
-------------------------------------

So would the usage look something like this?

{noformat}
~RecordBatchReader() {
  Status st = Close();
  if (!st.ok()) {
    st.Warn();
  }
}
{noformat}

Would we maybe want a macro similar to {{ABORT_NOT_OK}}?

{noformat}
~RecordBatchReader() {
  ARROW_WARN_NOT_OK(Close());
}
{noformat}

> [C++] Add Status::Warn()
> ------------------------
>
>                 Key: ARROW-16769
>                 URL: https://issues.apache.org/jira/browse/ARROW-16769
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Antoine Pitrou
>            Priority: Minor
>              Labels: good-first-issue
>             Fix For: 9.0.0
>
>
> We currently have {{Status::Abort()}} which gives an easy way to abort the 
> process with a meaningful message and detail.
> We should similarly add {{Status::Warn()}} that would simply print a warning 
> message of the error. Possible example use at 
> https://github.com/apache/arrow/pull/13315/files#diff-1256864b34a1b43082596ab5b16881702881ad06be8e1c157b47e1e6ac9ff5d2R160-R164
>  (together with {{StatusFromErrno}}).



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to