public void visitCatchStatement(CatchStatement cs) { resolveOrFail(cs.getExceptionType(), cs); if (cs.getExceptionType() == ClassHelper.DYNAMIC_TYPE) { cs.getVariable().setType(ClassHelper.make(Exception.class)); } super.visitCatchStatement(cs); }
@Override public void visitTryCatchFinally(final TryCatchStatement statement) { final List<CatchStatement> catchStatements = statement.getCatchStatements(); for (CatchStatement catchStatement : catchStatements) { ClassNode exceptionType = catchStatement.getExceptionType(); typeCheckingContext.controlStructureVariables.put(catchStatement.getVariable(), exceptionType); } try { super.visitTryCatchFinally(statement); } finally { for (CatchStatement catchStatement : catchStatements) { typeCheckingContext.controlStructureVariables.remove(catchStatement.getVariable()); } } }
public void visitCatchStatement(CatchStatement cs) { if (!(cs.getExceptionType().isDerivedFrom(ClassHelper.make(Throwable.class)))) { addError("Catch statement parameter type is not a subclass of Throwable.", cs); } super.visitCatchStatement(cs); }
ClassNode exceptionType = catchStatement.getExceptionType(); String exceptionTypeInternalName = BytecodeHelper.getClassInternalName(exceptionType);
@Override public void visitCatchStatement(CatchStatement statement) { // Add reference to class exception if (classes.containsKey(statement.getExceptionType().getName())) { indexer.addReference(classes.get(statement.getExceptionType().getName()), createLocation(statement.getExceptionType())); } // TODO(#125): add a symbol for the exception variables. Right now statement.getVariable() returns a Parameter // with an invalid location. super.visitCatchStatement(statement); }
public void visitCatchStatement(CatchStatement cs) { resolveOrFail(cs.getExceptionType(), cs); if (cs.getExceptionType() == ClassHelper.DYNAMIC_TYPE) { cs.getVariable().setType(ClassHelper.make(Exception.class)); } super.visitCatchStatement(cs); }
public void visitCatchStatement(CatchStatement cs) { resolveOrFail(cs.getExceptionType(), cs); if (cs.getExceptionType() == ClassHelper.DYNAMIC_TYPE) { cs.getVariable().setType(ClassHelper.make(Exception.class)); } super.visitCatchStatement(cs); }
public void visitCatchStatement(CatchStatement cs) { resolveOrFail(cs.getExceptionType(), cs); if (cs.getExceptionType() == ClassHelper.DYNAMIC_TYPE) { cs.getVariable().setType(ClassHelper.make(Exception.class)); } super.visitCatchStatement(cs); }
public void visitCatchStatement(CatchStatement cs) { resolveOrFail(cs.getExceptionType(), cs); if (cs.getExceptionType() == ClassHelper.DYNAMIC_TYPE) { cs.getVariable().setType(ClassHelper.make(Exception.class)); } super.visitCatchStatement(cs); }
public void visitCatchStatement(CatchStatement cs) { resolveOrFail(cs.getExceptionType(), cs); if (cs.getExceptionType() == ClassHelper.DYNAMIC_TYPE) { cs.getVariable().setType(ClassHelper.make(Exception.class)); } super.visitCatchStatement(cs); }
public void visitCatchStatement(CatchStatement cs) { if (!(cs.getExceptionType().isDerivedFrom(ClassHelper.make(Throwable.class)))) { addError("Catch statement parameter type is not a subclass of Throwable.", cs); } super.visitCatchStatement(cs); }
public void visitCatchStatement(CatchStatement cs) { if (!(cs.getExceptionType().isDerivedFrom(ClassHelper.make(Throwable.class)))) { addError("Catch statement parameter type is not a subclass of Throwable.", cs); } super.visitCatchStatement(cs); }
@Override public void visitCatchStatement(CatchStatement statement) { if (FindTypeUtils.isCaretOnClassNode(path, doc, cursorOffset)) { addOccurrences(statement.getExceptionType(), (ClassNode) FindTypeUtils.findCurrentNode(path, doc, cursorOffset)); } super.visitCatchStatement(statement); }
public void visitCatchStatement(CatchStatement cs) { if (!(cs.getExceptionType().isDerivedFrom(ClassHelper.make(Throwable.class)))) { addError("Catch statement parameter type is not a subclass of Throwable.", cs); } super.visitCatchStatement(cs); }
public void visitCatchStatement(CatchStatement cs) { if (!(cs.getExceptionType().isDerivedFrom(ClassHelper.make(Throwable.class)))) { addError("Catch statement parameter type is not a subclass of Throwable.", cs); } super.visitCatchStatement(cs); }
ClassNode exceptionType = catchStatement.getExceptionType();
@Override public void run() { literal(stmt.getExceptionType()); literal(stmt.getVariable().getName()); visit(stmt.getCode()); } });
ClassNode exceptionType = catchStatement.getExceptionType();
ClassNode exceptionType = catchStatement.getExceptionType();
ClassNode exceptionType = catchStatement.getExceptionType(); String exceptionTypeInternalName = BytecodeHelper.getClassInternalName(exceptionType);