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.

Bug 121963 - [60cat] Surround with try-catch feature is too greedy
Summary: [60cat] Surround with try-catch feature is too greedy
Status: CLOSED DUPLICATE of bug 121932
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 6.x
Hardware: Sun Solaris
: P3 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-15 08:17 UTC by johnemb
Modified: 2007-11-15 11:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description johnemb 2007-11-15 08:18:02 UTC
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 .
Comment 1 Vitezslav Stejskal 2007-11-15 09:59:43 UTC

*** This issue has been marked as a duplicate of 121932 ***
Comment 2 johnemb 2007-11-15 11:56:31 UTC
OK, I missed that issue when I searched prior to filing this issue. Please do monitor the mailing list threads for user
opinions.