You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/11/21 20:46:00 UTC
[jira] [Updated] (ARROW-6781) [C++] Improve and consolidate
ARROW_CHECK, DCHECK macros
[ https://issues.apache.org/jira/browse/ARROW-6781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated ARROW-6781:
----------------------------------
Labels: pull-request-available (was: )
> [C++] Improve and consolidate ARROW_CHECK, DCHECK macros
> --------------------------------------------------------
>
> Key: ARROW-6781
> URL: https://issues.apache.org/jira/browse/ARROW-6781
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Reporter: Ben Kietzman
> Assignee: Ben Kietzman
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Currently we have multiple macros like {{DCHECK_EQ}} and {{DCHECK_LT}} which check various comparisons but don't report anything about their operands. Furthermore, the "stream to assertion" pattern for appending extra info has proven fragile. I propose a new unified macro which can capture operands of comparisons and report them:
> {code:cpp}
> int three = 3;
> int five = 5;
> DCHECK(three == five, "extra: ", 1, 2, five);
> {code}
> Results in check failure messages like:
> {code}
> F1003 11:12:46.174767 4166 logging_test.cc:141] Check failed: three == five
> LHS: 3
> RHS: 5
> extra: 125
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)