Top "Finally" questions

Questions related to the finally block in try-catch construct.

c# "finally" block that only runs on exceptions

Edit: I have looked at the answers code: NONE of them do what I want (I've checked). It would seem …

c# exception-handling finally
python try-finally

Why does the exception in foo whizz by unnoticed, but the exception in bar is raised? def foo(): try: raise …

python exception try-catch finally
How to properly handle ThreadInterruptedException?

public void threadMethod() { try { // do something } catch (ThreadInterruptedException e) { Console.WriteLine("[Net]", role, "Thread interrupted."); n.CloseConnection(); } finally { if (isAutenticated == …

.net exception-handling finally