-
Bug
-
Resolution: Won't Fix
-
Trivial
-
None
-
Linux
Trying to abourt a build by throwing Run.RunnerAbortedException() in a RunListener.onStarted().
This used to work in older version 1.466.
Use case: I want to enforce certain conventions in all the jobs. If a job doesn't follow the convention, it will always fail. This gives job owners a natural incentive to adhere to the convention.
RunListener.fireStarted() seems to eat any exception (by just reporting it):
https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/listeners/RunListener.java#L198
Run.execute() never sees the exception:
https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Run.java#L1574
Seems like a bug to me. RunListener.fireStarted() should somehow rethrow these exceptions.