示例:
try {
def arr = new int[3]
arr[5] = 5
} catch(Exception ex) {
println('Catching the exception')
}
这里的参数 ex 永远不会在 catch 块中使用。
在应用快速修复后:
try {
def arr = new int[3]
arr[5] = 5
} catch(Exception ignored) {
println('Catching the exception')
}