try/catch accepts non-standard catch format
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
People
(Reporter: mark, Unassigned)
Details
Firefox seems to accept non-standard catch conditions in try/catch blocks.
According to the documentation, try/catch must always have a catch or finally statement, where the catch statement must always include an error object as a passed variable:
try {
do something
}
catch (error) {
do something with error (or not)
}
However, it accepts catch without (error) too:
try {
do something
}
catch {
}
That seems wrong and non-standard to me?
Comment 1•6 years ago
|
||
No it's part of ECMAScript 2019. This blog post explains it a bit.
| Reporter | ||
Comment 2•6 years ago
|
||
Can you please point me to the BZ bug then where you changed it so I can look at porting it? I haven't been able to find anything relevant before I posted this.
(Of note I find it a terrible change in ECMAScript allowing for this kind of further blurring syntax and setting up even more feature than can allow things to silently fail and make a terrible mess of debugging.)
Description
•