Examples of ScriptRuntimeException


Examples of org.mvel2.ScriptRuntimeException

  public BinaryOperation(int operation, ASTNode left, ASTNode right, ParserContext ctx) {
    super(ctx);
    this.operation = operation;
    if ((this.left = left) == null) {
      throw new ScriptRuntimeException("not a statement");
    }
    if ((this.right = right) == null) {
      throw new ScriptRuntimeException("not a statement");
    }

    //    if (ctx.isStrongTyping()) {
    switch (operation) {
      case Operator.ADD:
View Full Code Here

Examples of org.mvel2.ScriptRuntimeException

  }

  public Boolean peekBoolean() {
    if (size == 0) return null;
    if (element.value instanceof Boolean) return (Boolean) element.value;
    throw new ScriptRuntimeException("expected Boolean; but found: " + (element.value == null ? "null" : element.value.getClass().getName()));
  }
View Full Code Here

Examples of org.mvel2.ScriptRuntimeException

    if (size-- == 0) {
      return null;
    }
    try {
      if (element.value instanceof Boolean) return (Boolean) element.value;
      throw new ScriptRuntimeException("expected Boolean; but found: " + (element.value == null ? "null" : element.value.getClass().getName()));
    }
    finally {
      element = element.next;
      assert size == deepCount();
View Full Code Here

Examples of org.mvel2.ScriptRuntimeException

public class ImmutableDefaultFactory implements VariableResolverFactory {
  private boolean tiltFlag;

  private void throwError() {
    throw new ScriptRuntimeException("cannot assign variables; no variable resolver factory available.");
  }
View Full Code Here

Examples of org.mvel2.ScriptRuntimeException

  }

  public Boolean peekBoolean() {
    if (size == 0) return null;
    if (element.value instanceof Boolean) return (Boolean) element.value;
    throw new ScriptRuntimeException("expected Boolean; but found: " + (element.value == null ? "null" : element.value.getClass().getName()));
  }
View Full Code Here

Examples of org.mvel2.ScriptRuntimeException

    if (size-- == 0) {
      return null;
    }
    try {
      if (element.value instanceof Boolean) return (Boolean) element.value;
      throw new ScriptRuntimeException("expected Boolean; but found: " + (element.value == null ? "null" : element.value.getClass().getName()));
    }
    finally {
      element = element.next;
    }
  }
View Full Code Here

Examples of org.mvel2.ScriptRuntimeException

  }

  public BinaryOperation(int operation, ASTNode left, ASTNode right, ParserContext ctx) {
    this.operation = operation;
    if ((this.left = left) == null) {
      throw new ScriptRuntimeException("not a statement");
    }
    if ((this.right = right) == null) {
      throw new ScriptRuntimeException("not a statement");
    }

    //    if (ctx.isStrongTyping()) {
    switch (operation) {
      case Operator.ADD:
View Full Code Here

Examples of webit.script.exceptions.ScriptRuntimeException

    public Object get(Object object, Object property) {
        if (property instanceof Number) {
            try {
                return ((List) object).get(((Number) property).intValue());
            } catch (IndexOutOfBoundsException e) {
                throw new ScriptRuntimeException(StringUtil.concat("index out of bounds:", property));
            }
        }
        if ("size".equals(property)) {
            return ((List) object).size();
        }
        if ("isEmpty".equals(property)) {
            return ((List) object).isEmpty();
        }
        throw new ScriptRuntimeException(StringUtil.concat("Invalid property or can't read: java.util.List#", property));
    }
View Full Code Here

Examples of webit.script.exceptions.ScriptRuntimeException

            } else {
                list.set(index, value);
                return;
            }
        }
        throw new ScriptRuntimeException(StringUtil.concat("Invalid property or can't write: java.util.List#", property));
    }
View Full Code Here

Examples of webit.script.exceptions.ScriptRuntimeException

    public Object get(final Object object, final Object property) {
        if (property instanceof Number) {
            try {
                return ((CharSequence) object).charAt(((Number) property).intValue());
            } catch (IndexOutOfBoundsException e) {
                throw new ScriptRuntimeException(StringUtil.concat("index out of bounds:", property));
            }
        }
        if ("length".equals(property) || "size".equals(property)) {
            return ((CharSequence) object).length();
        }
        if ("isEmpty".equals(property)) {
            return ((CharSequence) object).length() == 0;
        }
        throw new ScriptRuntimeException(StringUtil.concat("Invalid property or can't read: java.lang.CharSequence#", property));
    }
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.