Hacker News new | ask | show | jobs
by maskros 1094 days ago
If "handle error" in the catch involves rethrowing the error, or another error, or returning an error code from the function, the "finally" block is _still_ executed.

Here's a "fun" example in Javascript:

  function foo() {
    try {
      return 42
    } finally {
      return "boo!"
    }
  }