From c9f34644533d175207f5d6432f6381f26efb4717 Mon Sep 17 00:00:00 2001 From: godotg Date: Sat, 20 Jan 2024 11:00:56 +0800 Subject: [PATCH] chore[exception]: convert exception type --- monitor/src/main/java/com/zfoo/monitor/util/OSUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monitor/src/main/java/com/zfoo/monitor/util/OSUtils.java b/monitor/src/main/java/com/zfoo/monitor/util/OSUtils.java index d7c196e48..d6315ed2b 100644 --- a/monitor/src/main/java/com/zfoo/monitor/util/OSUtils.java +++ b/monitor/src/main/java/com/zfoo/monitor/util/OSUtils.java @@ -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();