3 ms·
I thought that was called try...finally
by toxik 13y ago
I thought that was called try...finally
- louthy 13y agoNo, finally is always executed. The catch handler only executes when there's an exception.
- ColinDabritz 13y agoYes, as noted, it's a three part structure: try { MayThrowException(); } catch(MyExceptionType ex) { HandleIfException(ex); } finally { AlwaysRunCleanupRegardless(); }