This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In NB 6.0 beta2, the "Surround with try-catch" tool tip function is too greedy, in the sense that it includes more code in the try{} block than necessary. Actually, the entire code block is included in the try block both when leaving the caret position on a specific code line throwing an Exception and using the light bulb tip to surround the statement with try-catch. Also when using this feature of a selection of code, the editor ignores the selection and includes the entire code block in the try block. This, in addition to the non-configurable automatic logging code in the catch block (see issue 116818) makes this feature almost unusable. See nbuser mailing list threads at http://www.nabble.com/try-catch-Surround-t4807218.html and http://www.nabble.com/Where-did-%22surround-with-try-catch%22-go--t4765557.html .
*** This issue has been marked as a duplicate of 121932 ***
OK, I missed that issue when I searched prior to filing this issue. Please do monitor the mailing list threads for user opinions.