jenkinsci/build-flow-plugin — pull request #17 by hithwen (2012-07-06 10:16:48+00:00)
Title: Show nicer message when a job cannot be scheduled

When a job is already enqueued and a flow attempts to enqueue it it shows a really ugly stack trac that provides no real information.

FATAL: null
java.lang.NullPointerException
at com.cloudbees.plugins.flow.JobInvocation.getBuild(JobInvocation.java:45)
at com.cloudbees.plugins.flow.FlowRun.schedule(FlowRun.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)

I added a descriptive message on top of it