Examples of Catch


Examples of cn.wensiqun.asmsupport.block.control.Catch

        return false;
      }
    }
   
    //如果当前的操作在catch中并且有finally语句块则触发监听事件   
    Catch catchBlock = directCatchBlock(getExecuteBlock());
    if(catchBlock != null){
      finallyBlock = catchBlock.getFinallyBlock();
      if(finallyBlock != null){
        return true;
      }else{
        return false;
      }
View Full Code Here

Examples of cn.wensiqun.asmsupport.block.control.Catch

      //try prepare
     
      nearlyTryBlock.prepare();
     
      //catch prepare
      Catch catchBlock = nearlyTryBlock.getCatchEntity();
     
      Finally finallyBlock = nearlyTryBlock.getFinallyBlock();
     
      while(catchBlock != null){
        catchBlock.prepare();
        catchBlock = catchBlock.getNextCatch();
      }
     
      if(finallyBlock != null){
            try{
                OperatorFactory.newOperator(NoneOperator.class, new Class<?>[]{ProgramBlock.class}, getExecuteBlock());
View Full Code Here

Examples of com.consol.citrus.container.Catch

        assertEquals(builder.testCase().getActions().get(0).getClass(), Catch.class);
        assertEquals(builder.testCase().getActions().get(0).getName(), "catch");
        assertEquals(builder.testCase().getActions().get(1).getClass(), Catch.class);
        assertEquals(builder.testCase().getActions().get(1).getName(), "catch");
       
        Catch container = (Catch)builder.testCase().getActions().get(0);
        assertEquals(container.getActions().size(), 1);
        assertEquals(container.getException(), "com.consol.citrus.exceptions.CitrusRuntimeException");
        assertEquals(((EchoAction)(container.getActions().get(0))).getMessage(), "${var}");
       
        container = (Catch)builder.testCase().getActions().get(1);
        assertEquals(container.getActions().size(), 2);
        assertEquals(container.getException(), "com.consol.citrus.exceptions.CitrusRuntimeException");
        assertEquals(((EchoAction)(container.getActions().get(0))).getMessage(), "${var}");
        assertEquals(((SleepAction)(container.getActions().get(1))).getMilliseconds(), "100");
    }
View Full Code Here

Examples of com.consol.citrus.container.Catch

    @Test
    public void testCatchParser() {
        assertActionCount(1);
        assertActionClassAndName(Catch.class, "catch");
       
        Catch action = getNextTestActionFromTest();
        Assert.assertEquals(action.getException(), "com.consol.citrus.exceptions.CitrusRuntimeException");
        Assert.assertEquals(action.getActionCount(), 1);
        Assert.assertEquals(action.getActions().get(0).getClass(), FailAction.class);
    }
View Full Code Here

Examples of com.headius.invokebinder.transform.Catch

     * @param throwable the exception type to catch
     * @param function  the function to use for handling the exception
     * @return a new Binder
     */
    public Binder catchException(Class<? extends Throwable> throwable, MethodHandle function) {
        return new Binder(this, new Catch(throwable, function));
    }
View Full Code Here

Examples of dk.brics.string.intermediate.Catch

          translateStmt(stmt);
        }
   
    // create intermediate Catch statements for every catch block
    for (Trap trap : body.getTraps()) {
      Catch ct = new Catch();
      method.addStatement(ct);
     
      // remember the Catch statement associated with the trap
      catchers.put(trap, ct);
     
      // add the catch block as successor
      ct.addSucc(translations.get(trap.getHandlerUnit()).getFirst());
    }
       
        // connect according to normal flow
        AssertionContext assertionContext = new AssertionContext(jt, definitions, translations, sootMethod);
        BriefUnitGraph normalFlow = new BriefUnitGraph(body);
View Full Code Here

Examples of lombok.ast.Catch

    if (varName != null) varNameEntry.setPosition(varName.getPosition());
    VariableDefinition decl = new VariableDefinition().rawTypeReference(type).rawVariables().addToEnd(
        varNameEntry);
    if (type != null && varName != null) decl.setPosition(new Position(type.getPosition().getStart(), varName.getPosition().getEnd()));
    if (modifiers != null) decl.astModifiers(createModifiersIfNeeded(modifiers, currentPos()));
    return posify(new Catch().rawExceptionDeclaration(decl).rawBody(body));
  }
View Full Code Here

Examples of lombok.ast.Catch

      fillList(node.getCatches(), t.rawCatches());
      set(node, t);
    }
   
    @Override public void visitCatch(JCCatch node) {
      set(node, new Catch()
          .rawExceptionDeclaration(toTree(node.getParameter(), FlagKey.VARDEF_IS_DEFINITION))
          .rawBody(toTree(node.getBlock())));
    }
View Full Code Here

Examples of net.jangaroo.jooc.ast.Catch

  }

  @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"
View Full Code Here

Examples of nexj.core.meta.workflow.Catch

            return "Catch";
         }

         public Branch createBranch()
         {
            return new Catch();
         }

         public void loadActivity(Element element, Activity activity)
         {
            String sException = XMLUtil.getStringAttr(element, "exception");
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.