Skip to content

Commit

Permalink
[BugFix] Catch hardware exception of webpage index (StarRocks#34675)
Browse files Browse the repository at this point in the history
Fixes StarRocks#33976

Signed-off-by: kimmking <kimmking@163.com>
  • Loading branch information
kimmking authored Nov 9, 2023
1 parent b4b5657 commit 2074d22
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ public void executeGet(BaseRequest request, BaseResponse response) {
getPageHeader(request, response.getContent());
appendVersionInfo(response.getContent());
if (Config.http_web_page_display_hardware) {
appendHardwareInfo(response.getContent());
try {
appendHardwareInfo(response.getContent());
} catch (Throwable t) {
response.getContent().append("<h2>Hardware Info</h2>");
response.getContent().append("<pre>Hardware info is generated with error: " + t.getMessage() + "</pre>");
}
} else {
response.getContent().append("<h2>Hardware Info</h2>");
response.getContent().append("<pre>Hardware info is disabled by config http_web_page_display_hardware</pre>");
Expand Down

0 comments on commit 2074d22

Please sign in to comment.