News for hackers. Stuff that matters.
Re:Feature request for JavaScript: omit catch by calkuta on Saturday April 17, 2021 @07:00AM (#26843287)
Errors are silently suppressed, equivalent to

try {

} catch (err) { }

Re:Feature request for JavaScript: omit catch by zzo38computer on Saturday April 17, 2021 @01:58PM (#26846136)
This is contrary to what normally happens when you have try/finally without catch; in that case, it is rethrown automatically. That would be confusing if it was different, I think, and worthless if it was the same (being doing nothing).
Re:Feature request for JavaScript: omit catch by dragonwriter on Saturday April 17, 2021 @02:44PM (#26846438)
Since

  try {
    ...
  } catch(err) {}
does that, is clear and explicit, and doesn’t make no-catch mean something different than it does in

  try {
    ...
  } finally {
    ...
  }
I think “no 'catch' as empty 'catch' when there is no 'finally'” is just unnecessary inconsistency for no meaningful gain.