Closed Bug 1304811 Opened 9 years ago Closed 9 years ago

Unclear explanation in the try-catch paragraph

Categories

(Developer Documentation Graveyard :: JavaScript, defect, P5)

All
Other
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: eye.am, Unassigned)

References

()

Details

:: Developer Documentation Request Request Type: Correction Gecko Version: unspecified Technical Contact: :: Details I have found an unclear explanation in the "try...catch" paragraph. It says: "The try...catch statement consists of a try block, which contains one or more statements, and one or more catch blocks,". More than one catch block is not a standard feature and should be better explained. And hereafter in the "Nesting try...catch statements" paragraph it should be specify if you omit catch clause it is mandatory put finally clause after a try block. Best Regards.
(In reply to eye.am from comment #0) > It says: > "The try...catch statement consists of a try block, which contains one or > more statements, and one or more catch blocks,". > More than one catch block is not a standard feature and should be better > explained. Changed that sentence to: "The try...catch statement consists of a try block, which contains one or more statements, and a catch block, containing statements that specify what to do if an exception is thrown in the try block." Non-standard features aren't mentioned in the JavaScript guide in general. This is explained on the try...catch reference page. > And hereafter in the "Nesting try...catch statements" paragraph it should be > specify if you omit catch clause it is mandatory put finally clause after a > try block. "You can nest one or more try...catch statements. If an inner try...catch statement does not have a catch block, it needs to have a finally block and the enclosing try...catch statement's catch block is checked for a match. For more information, see nested try-blocks on the try...catch reference page." pointing to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch#Nested_try-blocks > Best Regards. Thanks for your bug report.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.