提交 decf902a 编写于 作者: J Jesse Glick

[FIXED JENKINS-21622] Release workspace leases (and avoid @2) even if...

[FIXED JENKINS-21622] Release workspace leases (and avoid @2) even if post-build actions throw LinkageError.
上级 0faa7b7d
......@@ -58,6 +58,9 @@ Upcoming changes</a>
<li class=bug>
More efficient deletion of old builds (specified by date).
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-22607">issue 22607</a>)
<li class=bug>
Linkage errors in notifiers could leak workspace leases.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-21622">issue 21622</a>)
<li class=bug>
Fix a bug which only showed the first detail part for radio buttons.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-22583">issue 22583</a>)
......
......@@ -712,17 +712,23 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
r = false;
}
} catch (Exception e) {
String msg = "Publisher " + bs.getClass().getName() + " aborted due to exception";
e.printStackTrace(listener.error(msg));
LOGGER.log(WARNING, msg, e);
if (phase) {
setResult(Result.FAILURE);
}
reportError(bs, e, listener, phase);
} catch (LinkageError e) {
reportError(bs, e, listener, phase);
}
}
return r;
}
private void reportError(BuildStep bs, Throwable e, BuildListener listener, boolean phase) {
String msg = "Publisher " + bs.getClass().getName() + " aborted due to exception";
e.printStackTrace(listener.error(msg));
LOGGER.log(WARNING, msg, e);
if (phase) {
setResult(Result.FAILURE);
}
}
/**
* Calls a build step.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册