Skip to content

Instantly share code, notes, and snippets.

@solvingj
Created May 6, 2020 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save solvingj/b5b6d44142e8323425dae365cba0b9a2 to your computer and use it in GitHub Desktop.
Save solvingj/b5b6d44142e8323425dae365cba0b9a2 to your computer and use it in GitHub Desktop.
Extending CpsScript Impossible?
// Fails to compile with:
// CpsScriptMock.java:15: error: unreported exception IOException; must be caught or declared to be thrown
// But i'm throwing it right?
package demo.ci
import org.jenkinsci.plugins.workflow.cps.CpsScript
class CpsScriptMock extends CpsScript {
CpsScriptMock() throws IOException {
}
@Override
Object run() {
return null
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment