morningman commented on code in PR #49714: URL: https://github.com/apache/doris/pull/49714#discussion_r2049563630
########## be/src/http/action/adjust_log_level.cpp: ########## @@ -38,8 +38,18 @@ std::tuple<std::string, int, int> handle_request(HttpRequest* req) { }; const auto& module = parse_param("module"); const auto& level = parse_param("level"); - int new_level = std::stoi(level); - return std::make_tuple(module, google::SetVLOGLevel(module.c_str(), new_level), new_level); + try { + int new_level = std::stoi(level); Review Comment: I searched the code base and find there are a lot `std::stoi`. So I suggest to extract a method, like `safe_stoi()` to handle this, so we don't need to catch these exception everywhere. ########## .idea/vcs.xml: ########## @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> Review Comment: Why removing 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. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org