Explorar o código

优化脚本结果判断

zhouhao %!s(int64=8) %!d(string=hai) anos
pai
achega
e81080a919

+ 1 - 9
hsweb-web-starter/src/main/java/org/hsweb/web/starter/SystemInitialize.java

@@ -176,15 +176,7 @@ public class SystemInitialize implements InitializingBean {
             engine.compile(id, s);
             ExecuteResult result = engine.execute(id, var);
             engine.remove(id);
-            if (result.isSuccess()) {
-                //logger.debug("install success!");
-            } else {
-                if (result.getException() != null) {
-                    throw (Exception) result.getException();
-                } else {
-                    throw new RuntimeException("execute groovy script error!");
-                }
-            }
+            result.getIfSuccess();
         }
     }