Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6-rc-1
-
None
Description
Unlike Java, Groovy allows try statements without a catch or finally block:
class TryWithoutCatchOrFinally {
static void main(args) {
try
}
}
Execution of such a try statement just executes the try block (it doesn't swallow exceptions). The following discussion seems to come to the conclusion that it would be better to follow Java and raise a syntax error: http://www.nabble.com/Try-statement-without-catch-or-finally-block-td21542131.html