Issue Type: Bug Bug
Assignee: Jesse Glick
Components: workflow-plugin
Created: 18/Dec/14 6:46 PM
Description:

CpsStepContext.replay wraps checked exceptions in UndeclaredThrowableException; it has to, because the call from DSL implements GroovyObject.invokeMethod which, mysteriously, does not allow checked exceptions. After a few false starts, in https://github.com/jenkinsci/workflow-plugin/commit/2432b1e7518a2963983e9a099ae16b9ebfe1ffc1 I have made CpsBodyExecution.FailureAdapter unwrap this, so that this hack is transparent to ErrorAction (needed to handle AbortException in WorkflowRun.finish) and BodyExecutionCallback.onFailure (needed for CatchErrorStep, similarly to print a polite message not a stack trace).

Yet I have found that this wrapping is still not transparent: when a checked exception is thrown from a step (for example, an IOException from readFile), any Groovy code which tries to catch (IOException x) will not work; at the Groovy level, an UndeclaredThrowableException is received.

Project: Jenkins
Priority: Major Major
Reporter: Jesse Glick
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to