Skip to content

Instantly share code, notes, and snippets.

@gregorydickson
Last active November 15, 2017 19:23
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 gregorydickson/3e3a348bea09133bdbe9824535028c97 to your computer and use it in GitHub Desktop.
Save gregorydickson/3e3a348bea09133bdbe9824535028c97 to your computer and use it in GitHub Desktop.
def aList = ['1','2','3','4']
try {
aList.each { string ->
if (string == '3') {
throw new Exception("Break")
}
}
} catch (Exception e) { } // throw away the exception
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment