5 ms·
Errors are silently suppressed, equivalent to try { } catch (err) { }
by calkuta 5y ago
Errors are silently suppressed, equivalent to
try {
} catch (err) {
}
- zzo38computer 5y agoThis 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).
- dragonwriter 5y agoSince 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.