try {
def arr = new int[5]
arr[12] = 848
} catch(ArrayIndexOutOfBoundsException ex) {
println "Exception: ${ex}"
} catch(Exception ex) {
println "Exception: ${ex}"
}
println "After try catch catch"
/*
run:
Exception: java.lang.ArrayIndexOutOfBoundsException: Index 12 out of bounds for length 5
After try catch
*/