News for hackers. Stuff that matters.
Re:Promise.prototype.finally by GroSacASacs on Monday October 23, 2017 @01:18PM (#15534846)
incorrect

     try {
        throw new Error("catch me !"); // force try to fail
      } catch (catchedError) {
        console.log("inside catch");
        // throw new Error("hmm");
      } finally {
        // always executed         
        console.log("inside finally");
      }
      // always executed
      console.log("after try catch finally");


the finally statement can be useful when another error is thrown inside the catch block, in which case you have more serious problems in your code

There are no comments on this comment yet.