You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/04/08 01:29:30 UTC

[GitHub] [incubator-doris] yiguolei commented on a diff in pull request #8900: [Refactor-step1] Add OLAPInternalError to status

yiguolei commented on code in PR #8900:
URL: https://github.com/apache/incubator-doris/pull/8900#discussion_r845670569


##########
be/src/common/status.h:
##########
@@ -151,8 +155,18 @@ class Status {
         return Status(TStatusCode::DATA_QUALITY_ERROR, msg, precise_code, msg2);
     }
 
+    // A wrapper for OLAPStatus
+    //      Precise code is for OLAPStatus's enum value
+    //      All Status Error is treated as Internal Error 
+    static Status OLAPInternalError(int16_t precise_code, const Slice& msg = Slice()) {
+        #ifdef PRINT_ALL_ERR_STATUS_STACKTRACE
+        LOG(WARNING) << "Error occurred, error code = " << precise_code << ", with message: " << msg
+                     << "\n" << boost::stacktrace::stacktrace();

Review Comment:
   Does java have this feature? Could you show me some demo code in JAVA?



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org