Examples of CatchClause


Examples of org.eclipse.jdt.core.dom.CatchClause

      }
    }
    node.getBody().accept(this);
    this.buffer.append(" ");//$NON-NLS-1$
    for (Iterator it = node.catchClauses().iterator(); it.hasNext(); ) {
      CatchClause cc = (CatchClause) it.next();
      cc.accept(this);
    }
    if (node.getFinally() != null) {
      this.buffer.append(" finally ");//$NON-NLS-1$
      node.getFinally().accept(this);
    }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.CatchClause

      context = new ProcessingContext(context.previousVertice, finallyStart, Pair.create(finallyStart, bc));
    }
    //exceptions next
    if (node.catchClauses() != null && node.catchClauses().size() > 0) {
      for(Object catchClauseObj: node.catchClauses()) {
        CatchClause catchClause = (CatchClause) catchClauseObj;
        CFGVertice catchStart = graph.addNewVertice(catchClause, "Catch " + catchClause.getException());
        graph.createExceptionEdge(context.previousVertice, catchStart, catchClause.getException());
        BlockContext cbc = pushNewBlockContext(node);
        SimpleName excVariable = catchClause.getException().getName();
        if (excVariable!=null)
          cbc.add(excVariable);
        processBlock(catchClause.getBody(), context.setPrevious(catchStart), cbc);
        if (blockStack.pop() != cbc)
          throw new MethodCFGBuilderException("Different block context!!");
      }
    }
    acceptChild(node.getBody(), context);
View Full Code Here

Examples of org.eclipse.php.internal.core.compiler.ast.nodes.CatchClause

    super(goal);
  }

  public IGoal[] init() {
    ExpressionTypeGoal typedGoal = (ExpressionTypeGoal) goal;
    CatchClause catchClause = (CatchClause) typedGoal.getExpression();

    SimpleReference type = catchClause.getClassName();
    if (type != null) {
      result = PHPClassType.fromSimpleReference(type);
    }
    return IGoal.NO_GOALS;
  }
View Full Code Here

Examples of org.mozilla.javascript.ast.CatchClause

    return s;
  }

  @Override
  public AstNode catchClause(AstNode varName, AstNode body) {
    CatchClause c = new CatchClause();
    c.setVarName(cast(varName, Name.class));
    if (body instanceof Block) {
      c.setBody((Block) body);
    } else {
      Block b = new Block();
      b.addStatement(body);
      c.setBody(b);
    }
    return c;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.