yiguolei commented on code in PR #55067:
URL: https://github.com/apache/doris/pull/55067#discussion_r2287682169


##########
be/src/common/exception.h:
##########
@@ -27,16 +27,16 @@
 #include <utility>
 
 #include "common/status.h"
-#include "util/defer_op.h"
+#include "util/defer_op.h" // IWYU pragma: keep
 
 namespace doris {
 
 inline thread_local int enable_thread_catch_bad_alloc = 0;
 class Exception : public std::exception {
 public:
     Exception() : _code(ErrorCode::OK) {}
-    Exception(int code, const std::string_view& msg);
-    Exception(const Status& status) : Exception(status.code(), status.msg()) {}
+    Exception(int code, const std::string_view& msg, bool from_status = false);

Review Comment:
   不要在一个public 的方法上加这种只有内部会使用的参数。
   直接写一个新的构造函数是private的,让这两个构造函数来调用把



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to