Skip to content

Commit

Permalink
chore[exception]: convert exception type
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysunxiao committed Jan 20, 2024
1 parent ace1d76 commit c9f3464
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions monitor/src/main/java/com/zfoo/monitor/util/OSUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,12 @@ public static String execCommand(String command) {

// 返回编译是否成功
if (exitValue != 0) {
throw new Exception("执行命令错误,返回码:" + exitValue);
throw new RuntimeException("error executing command, return code:" + exitValue);
}

return result;
} catch (Exception e) {
logger.error("命令执行未知异常", e);
logger.error("unknown exception in command execution", e);
} finally {
if (process != null) {
process.destroy();
Expand Down

0 comments on commit c9f3464

Please sign in to comment.