GrCatchClause (@NotNull PsiClassType type, @NotNull String parameterName) { @NonNls StringBuilder buffer = new StringBuilder("try{} catch("); if (type == null) { buffer.append("Throwable "); } else { buffer.append(type.getCanonicalText()).append(" "); } buffer.append(parameterName).append("){\n}"); final GrTryCatchStatement statement = (GrTryCatchStatement)createStatementFromText(buffer); return statement.getCatchClauses()[0]; }