imay commented on a change in pull request #2969: Improve implementation of Status URL: https://github.com/apache/incubator-doris/pull/2969#discussion_r382638860
########## File path: be/src/common/status.h ########## @@ -248,49 +256,42 @@ class Status { }; // some generally useful macros -#define RETURN_IF_ERROR(stmt) \ - do { \ +#define RETURN_IF_ERROR(stmt) \ + do { \ const Status& _status_ = (stmt); \ - if (UNLIKELY(!_status_.ok())) { \ - return _status_; \ - } \ - } while (false) - -#define RETURN_IF_STATUS_ERROR(status, stmt) \ - do { \ - status = (stmt); \ - if (UNLIKELY(!status.ok())) { \ - return; \ - } \ + if (UNLIKELY(!_status_.ok())) { \ + return _status_; \ + } \ } while (false) -#define EXIT_IF_ERROR(stmt) \ - do { \ - const Status& _status_ = (stmt); \ - if (UNLIKELY(!_status_.ok())) { \ - string msg = _status_.get_error_msg(); \ - LOG(ERROR) << msg; \ - exit(1); \ - } \ +#define EXIT_IF_ERROR(stmt) \ Review comment: Emmm, why do this alignment? This will make it more difficult to maintain this ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org