Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Exceptions thrown in finally blocks (e.g. in CodeFormatterVisitor.exitNode)

In working on https://bugs.eclipse.org/bugs/show_bug.cgi?id=403452 I found that it was caused by an exception being thrown from within a finally block (see the bug for details). I know it’s generally considered a Bad Thing to throw exceptions from within finally blocks, but I’m not sure how best to refactor the code in question to stop it doing so.

 

Suggestions would be gratefully appreciated.

 

Here’s a good entry point into the code in question:

https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CodeFormatterVisitor.java#n2503


Back to the top