}
@Override
public void visitCatch(Catch aCatch) throws IOException {
List<Catch> catches = aCatch.getParentTryStatement().getCatches();
Catch firstCatch = catches.get(0);
boolean isFirst = aCatch.equals(firstCatch);
boolean isLast = aCatch.equals(catches.get(catches.size() - 1));
TypeRelation typeRelation = aCatch.getParam().getOptTypeRelation();
boolean hasCondition = aCatch.hasCondition();
if (!hasCondition && !isLast) {
throw Jooc.error(aCatch.getRParen(), "Only last catch clause may be untyped.");
}
final JooSymbol errorVar = firstCatch.getParam().getIde().getIde();
final JooSymbol localErrorVar = aCatch.getParam().getIde().getIde();
// in the following, always take care to write whitespace only once!
out.writeSymbolWhitespace(aCatch.getSymKeyword());
if (isFirst) {
out.writeSymbolToken(aCatch.getSymKeyword()); // "catch"