VariableDefinitionEntry varNameEntry = new VariableDefinitionEntry().astName(createIdentifierIfNeeded(varName, currentPos()));
if (varName != null) varNameEntry.setPosition(varName.getPosition());
VariableDefinition decl = new VariableDefinition().rawTypeReference(type).rawVariables().addToEnd(
varNameEntry);
if (type != null && varName != null) decl.setPosition(new Position(type.getPosition().getStart(), varName.getPosition().getEnd()));
if (modifiers != null) decl.astModifiers(createModifiersIfNeeded(modifiers, currentPos()));
return posify(new Catch().rawExceptionDeclaration(decl).rawBody(body));
}
public Node createTryStatement(Node body, List<Node> catches, Node finallyBody) {
Try result = new Try().rawBody(body).rawFinally(finallyBody);