Package webit.script.exceptions

Examples of webit.script.exceptions.ScriptRuntimeException


        int index = indexers[this.indexer].getIndex(key);
        if (index >= 0) {
            return this.vars[index];
        }
        if (force) {
            throw new ScriptRuntimeException("Not found variant named:".concat(key));
        }
        return null;
    }
View Full Code Here


            for (int i = 0; i < len; i++) {
                results[i] = exprs[i].execute(context);
            }
            return ((MethodDeclare) funcObject).invoke(context, results);
        }
        throw new ScriptRuntimeException("not a function", this);
    }
View Full Code Here

        Object result;
        final int num1;
        if ((result = leftExpr.execute(context)) instanceof Number) {
            num1 = ((Number) result).intValue();
        } else {
            throw new ScriptRuntimeException(StringUtil.concatObjectClass("left need a int, but found ", result), this);
        }
        final int num2;
        if ((result = rightExpr.execute(context)) instanceof Number) {
            num2 = ((Number) result).intValue();
        } else {
            throw new ScriptRuntimeException(StringUtil.concatObjectClass("right need a int, but found ", result), this);
        }
        if (num1 < num2) {
            return new IntAscIter(num1, num2);
        } else {
            return new IntDescIter(num1, num2);
View Full Code Here

    public Object execute(Context context) {
        try {
            return field.get(null);
        } catch (Exception ex) {
            return new ScriptRuntimeException("Failed to get static field value: ".concat(field.toString()), ex, this);
        }
    }
View Full Code Here

    public Object setValue(Context context, Object value) {
        try {
            field.set(null, value);
            return value;
        } catch (Exception ex) {
            return new ScriptRuntimeException("Failed to set static field value: ".concat(field.toString()), ex, this);
        }
    }
View Full Code Here

TOP

Related Classes of webit.script.exceptions.ScriptRuntimeException

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.