rewrite
rewrite copied to clipboard
GroovyParser support for multi-catch blocks
Currently our GroovyParser cannot interpret this form of multi-catch block:
try {
} catch (RuntimeException | Exception e) {
}
It's a bit of a headache to support as I've observed that in this case the Groovy AST only records the first of the exception types being |'d together. So we have to do some hacking to work around that.
This form of catch block is uncommon, particularly in the gradle scripts we care most about, so this isn't high priority. If you care about this issue I'm open to pull requests, or ping me on our community slack.