public void visitThrowStatement(GrThrowStatement throwStatement) { final GrExpression exception = throwStatement.getException(); if (exception == null) return; exception.accept(this); final InstructionImpl throwInstruction = new ThrowingInstruction(throwStatement); addNodeAndCheckPending(throwInstruction); interruptFlow(); final PsiType type = getNominalTypeNoRecursion(exception); if (type != null) { ExceptionInfo info = findCatch(type); if (info != null) { info.myThrowers.add(throwInstruction); } else { addPendingEdge(null, throwInstruction); } } else { addPendingEdge(null, throwInstruction); } }
private static boolean throwStatementsAreEquivalent( @NotNull GrThrowStatement statement1, @NotNull GrThrowStatement statement2) { final GrExpression exception1 = statement1.getException(); final GrExpression exception2 = statement2.getException(); return expressionsAreEquivalent(exception1, exception2); }