Hi, 

this code actually doesnt work in a Sandbox, because I´m not allowed to use 
new XmlSlurper() or its method setErrorHandler(....)

import groovy.util.XmlSlurper

node ("master") {
    stage ("1st Stage")
    git url:
"ssh://[email protected]:7999/cd/deployment-configs.git", 
credentialsId: "Bitbucket_Access"

    stage ("2nd Stage")
    try {
      XmlSlurper slurper = new XmlSlurper()
      slurper.setErrorHandler( null )
    } catch( exc ) {
      error( "something went wrong: ${exc}" )        
      //throw new RuntimeException( "you were not allowed for ${exc}", exc)
    }
}

I tried to approve the missing method - but it didnt appear in the list when 
using Pipeline´s error(....) script.
Switching back to a re-thrown new RuntimeException( "...", exc) i could 
approve the classes, methods as expected.

For Sandbox code it looks like using error(....) isn´t a good approach, 
right ?

best regards, 

Torsten


-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/36adae17-4180-4c0b-9972-99aa833b45b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to