I do the maintenance in a Groovy application that has explicitly non-standard error handling - lots of catch (Exception e) {}
instances all over the place. I want to implement much finer-grained exception handling, but for this I need to know what exceptions a given handler block can expect to catch, and since Groovy does not comply with Java's exception-checking rules, it is trivial.
If I had a reliable testing platform for this application, I would simply delete all the handlers and then check them until I have an exhaustive list of the ways in which it can fall, but, unfortunately, this code is part of a rather dirty distributed an application that exists mainly in production and depends on the user equipment, so creating a test bench for it is a much bigger task than I currently have resources for.
So, I am wondering if there is any shortcut (a specific IDE with the correct magic, even), with which I can analyze the code and get a list of all possible exceptions that this operator can throw?
source share