exception handling take 3
This commit is contained in:
parent
3f9337752f
commit
9941894a4f
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
@ -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"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user