FlowInterruptedException::getMessage returns exception details#236
Conversation
I think this would only affect the Java debugger, since https://github.com/jenkinsci/workflow-job-plugin/blob/62ac59c112dd34b65b8c3c37f99844b5c9caae75/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java#L657-L658 would normally be calling message in the constructor would normally be wasteful, so it would be better to override getMessage.
|
|
Not sure what do you mean by Java debugging. The reason why I prepare this PR is that having groovy pipelines defined in Jenkins shared library I found that exception is triggered but nothing goes to output, console. This is the only exception that is problematic, others report correctly. I'm ok with moving this to Additionally: should we also include. |
|
Also I don't think this computing is very complex so I would rather calculate it once once and do not count this every time |
Not sure what scenario you are referring to. |
42372ab to
49bdb36
Compare
|
Moved to |
|
@jglick PR is fixed, can you comment or merge ? |
Class
FlowInterruptedExceptiondoes not meetgetMessage()contract defined in Throwable class.Constructor does not pass
messageto parent class so latergetMessage()returnsnullvalue. This means that every generic code that usesgetMessage()intry catchblock returns empty value for this class making debugging harder.Testing done
Unit test cases have been provided to prove the implementation.
Submitter checklist