Conditions when finally does not execute in a .NET try-finally block

Two possibilities:

  • StackOverflowException
  • ExecutionEngineException

The finally block will not be executed when there’s a StackOverflowException since there’s no room on the stack to even execute any more code. It will also not be called when there’s an ExecutionEngineException, which may arise from a call to Environment.FailFast().

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)