From 9941894a4fa5dfa2b0584a1dd0a946ede2a4cb91 Mon Sep 17 00:00:00 2001 From: Dominik Chilla Date: Sat, 11 Jul 2020 23:48:19 +0200 Subject: [PATCH] exception handling take 3 --- Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0774478..83888be 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,7 +7,6 @@ pipeline { stage('Approve'){ steps { script { - import org.jenkinsci.plugins.workflow.steps.FlowInterruptedException def userInput try { timeout(time: 5, unit: 'SECONDS') { @@ -18,7 +17,7 @@ pipeline { name: 'Please confirm you agree with this' ]]) } - } catch(FlowInterruptedException e) { + } catch(org.jenkinsci.plugins.workflow.steps.FlowInterruptedExceptionedException e) { echo "This job timed out" } catch(err) { // input false echo "This job has been aborted"