Package com.ardublock.translator.block.exception

Examples of com.ardublock.translator.block.exception.BlockException


    String servoSpecs = ",620,2200";

    if (!( tb instanceof NumberBlock ) )
    {
      throw new BlockException(this.blockId, "the Pin# of Servo must be a number");
    }

    String pinNumber = tb.toCode();
    String servoName = "servo_pin_" + pinNumber;
View Full Code Here


  {
    String varName="";
    TranslatorBlock name = this.getRequiredTranslatorBlockAtSocket(0);
    TranslatorBlock size = this.getRequiredTranslatorBlockAtSocket(1);
    if (!(name instanceof VariableFakeBlock)) {
      throw new BlockException(blockId, uiMessageBundle.getString("ardublock.error_msg.array_var_slot"));
    }
    if (!(size instanceof NumberBlock)) {
      throw new BlockException(blockId, uiMessageBundle.getString("ardublock.error_msg.array_size_slot"));
    }
   
    varName+=name.toCode();
    int foo = Integer.parseInt(size.toCode());
    varName+="[";
View Full Code Here

      ret = ret + ")";
      return codePrefix + ret + codeSuffix;
    }
    else
    {
      throw new BlockException(blockId, "must be a number");
    }
  }
View Full Code Here

      ret = ret + ") > 1000";
      return codePrefix + ret + codeSuffix;
    }
    else
    {
      throw new BlockException(blockId, "analog pin# must be a number");
    }
  }
View Full Code Here

TOP

Related Classes of com.ardublock.translator.block.exception.BlockException

Copyright © 2018 www.massapicom. 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.