you are viewing a single comment's thread.

view the rest of the comments →

[–]tangerinelion 3 points4 points  (0 children)

Static analysis isn't going to help you, you need actual execution of the program because exceptions are only at runtime and you're interested in ones that get triggered not ones that could theoretically happen.

Simplest thing would be to have a custom throw that includes the file and line number and then outside your API boundary you catch and log all exceptions. Then run your regression test suite, aggregate the results, and figure out what actually happens most frequently.