|
@@ -1,6 +1,7 @@
|
|
|
package cn.reghao.devops.mgr.mgr.build.chain;
|
|
package cn.reghao.devops.mgr.mgr.build.chain;
|
|
|
|
|
|
|
|
import cn.reghao.devops.mgr.mgr.build.chain.impl.BuildChainResult;
|
|
import cn.reghao.devops.mgr.mgr.build.chain.impl.BuildChainResult;
|
|
|
|
|
+import cn.reghao.jutil.jdk.exception.ExceptionUtil;
|
|
|
import cn.reghao.jutil.jdk.result.Result;
|
|
import cn.reghao.jutil.jdk.result.Result;
|
|
|
import cn.reghao.jutil.jdk.result.ResultStatus;
|
|
import cn.reghao.jutil.jdk.result.ResultStatus;
|
|
|
|
|
|
|
@@ -29,8 +30,13 @@ public class Bootstrap<K extends HandlerParam, V extends HandlerResult> implemen
|
|
|
first.handle(buildParam, buildResult);
|
|
first.handle(buildParam, buildResult);
|
|
|
result = Result.result(ResultStatus.SUCCESS);
|
|
result = Result.result(ResultStatus.SUCCESS);
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
- //String errMsg = ExceptionUtil.stackTrace(e);
|
|
|
|
|
- String errMsg = e.getMessage();
|
|
|
|
|
|
|
+ String errMsg;
|
|
|
|
|
+ if (e instanceof NullPointerException) {
|
|
|
|
|
+ errMsg = ExceptionUtil.stackTrace(e);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ errMsg = e.getMessage();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (errMsg.length() > 20_000) {
|
|
if (errMsg.length() > 20_000) {
|
|
|
errMsg = errMsg.substring(0, 20_000);
|
|
errMsg = errMsg.substring(0, 20_000);
|
|
|
}
|
|
}
|