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.
The editor actions which indent and comment code will accept a multi-line selection which starts and ends in middles of lines, but SurroundWithTryCatch doesn't. If you have a single cursor and no selection SurroundWithTryCatch will do it's thing on the one line the selection is in. If you have more than one line, having gotten used to how indent and comment work I figured a sloppy selection would do, but I got an error Cannot surround selected block with try-catch. When I carefully selected the whole two lines it worked. I wold be more useful if it cold handle sloppy selection like indent and comment ... seems like an opportunity for some code factoring.