[
https://issues.apache.org/jira/browse/GROOVY-8847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles closed GROOVY-8847.
-------------------------------
Resolution: Information Provided
Utility methods exist for adding catch and resource statements after creating
the initial try-finally statement.
> TryCatchStatement - adding constructor with List<CatchStatement> parameter
> --------------------------------------------------------------------------
>
> Key: GROOVY-8847
> URL: https://issues.apache.org/jira/browse/GROOVY-8847
> Project: Groovy
> Issue Type: Improvement
> Affects Versions: 2.5.2
> Reporter: Anton Pryamostanov
> Priority: Minor
> Labels: ast
>
> Currently TryCatchStatement only has 1 constructor:
> {code}
> public TryCatchStatement(Statement tryStatement, Statement
> finallyStatement) {
> this.tryStatement = tryStatement;
> this.finallyStatement = finallyStatement;
> }
> {code}
> As per existing practice for other Statements and Expressions, suggest to add
> the missing constructor:
> {code}
> public TryCatchStatement(Statement tryStatement, Statement
> finallyStatement, List<CatchStatement> catchStatements) {
> this.tryStatement = tryStatement;
> this.finallyStatement = finallyStatement;
> this.catchStatements = catchStatements;
> }
> {code}
> This will make initialization easier.
> Note: GeneralUtils does not have helper method for TryCatchStatement.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)