According to the Jenkins documentation for timeout, there is an exception
thrown:
Executes the code inside the block with a determined time out limit. If the
time limit is reached, an exception is thrown, which leads in aborting the
build (unless it is caught and processed somehow).


How do I catch the specific exception for *timeout*? the parameter inside
catch is not specific enough for it.

try {// some stages for the workflow}
catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException e){
}


On Mon, Mar 19, 2018 at 12:48 PM, Victor Martinez <
victormartinezru...@gmail.com> wrote:

> I did play with that sometime ago but I don't have access to those
> pipelines anymore... The below article might help you out:
> - https://support.cloudbees.com/hc/en-us/articles/
> 226554067-Pipeline-How-to-add-an-input-step-with-timeout-
> that-continues-if-timeout-is-reached-using-a-default-value
>
> Although it's not about the declarative pipeline but the scripted one. but
> likely it works for your use case.
>
> Cheers
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-users/-ifvFnu_Un4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/7b34bb58-d0e0-4d38-8d47-eff33f4839c8%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/7b34bb58-d0e0-4d38-8d47-eff33f4839c8%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Idan Adar*

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAA6x3wdK%3DsFpUtcuGU6T7FDqTHOHN%2BpfjX9nKL6SRzRs8qFu%2BA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to