Examples of MissingParameterException


Examples of com.sk89q.worldedit.util.command.MissingParameterException

    @Override
    public String next() throws ParameterException {
        try {
            return arguments[index++];
        } catch (ArrayIndexOutOfBoundsException e) {
            throw new MissingParameterException();
        }
    }
View Full Code Here

Examples of com.sk89q.worldedit.util.command.MissingParameterException

        } catch (IndexOutOfBoundsException e) {
            if (nonNullBoolean) { // Special case
                return false;
            }
           
            throw new MissingParameterException();
        }
    }
View Full Code Here

Examples of com.sk89q.worldedit.util.command.MissingParameterException

        try {
            String value = StringUtil.joinString(arguments, " ", index);
            markConsumed();
            return value;
        } catch (IndexOutOfBoundsException e) {
            throw new MissingParameterException();
        }
    }
View Full Code Here

Examples of com.sk89q.worldedit.util.command.MissingParameterException

            throws ParameterException {
        Command annotation = method.getAnnotation(Command.class);
       
        if (annotation != null) {
            if (context.argsLength() < annotation.min()) {
                throw new MissingParameterException();
            }
   
            if (annotation.max() != -1 && context.argsLength() > annotation.max()) {
                throw new UnconsumedParameterException(
                        context.getRemainingString(annotation.max()));
View Full Code Here

Examples of com.volantis.map.common.param.MissingParameterException

        return params.getProperty(name);
    }

    private void checkParameter(String name) throws MissingParameterException {
        if (!params.containsKey(name)) {
            throw new MissingParameterException("Missing parameter: " + name);
        }
    }
View Full Code Here

Examples of com.volantis.map.common.param.MissingParameterException

        String result;
        Object value = objects.get(name);
        if (value instanceof String) {
            result = (String)value;
        } else if (null != value) {
            throw new MissingParameterException("incompatible-parameter",
                    new String[] { name, "string", value.getClass().getName() });
        } else {
            throw new MissingParameterException("missing-parameter", name);
        }
        return result;
    }
View Full Code Here

Examples of com.volantis.map.common.param.MissingParameterException

        if (value instanceof Float) {
            result = (Float)value;
        } else if (value instanceof String) {
            result = Float.valueOf((String)value);
        } else if (value != null ) {
            throw new MissingParameterException("incompatible-parameter",
                    new String[] { name, "float", value.getClass().getName() });
        } else {
            throw new MissingParameterException("missing-parameter", name);       
        }
        return result;
    }
View Full Code Here

Examples of com.volantis.map.common.param.MissingParameterException

        if (value instanceof Integer) {
            result = (Integer)value;
        } else if (value instanceof String) {
            result =Integer.valueOf((String)value);
        } else if (value != null ) {
            throw new MissingParameterException("incompatible-parameter",
                    new String[] { name, "int", value.getClass().getName() });
        } else {
            throw new MissingParameterException("missing-parameter", name);
        }
        return result;
    }
View Full Code Here

Examples of com.volantis.map.common.param.MissingParameterException

        if (value instanceof Boolean) {
            result = (Boolean)value;
        } else if (value instanceof String) {
            result =Boolean.valueOf((String)value);
        } else if (value != null ) {
            throw new MissingParameterException("incompatible-parameter",
                    new String[] { name, "boolean", value.getClass().getName() });
        } else {
            throw new MissingParameterException("missing-parameter", name);
        }
        return result;
    }
View Full Code Here

Examples of net.sf.jelly.apt.strategies.MissingParameterException

  //Inherited.
  protected Iterator<WebFault> getLoop(TemplateModel model) throws TemplateException {
    WebMethod webMethod = this.webMethod;
    if (webMethod == null) {
      throw new MissingParameterException("webMethod");
    }

    return webMethod.getWebFaults().iterator();
  }
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.