Package org.eclipse.jetty.start

Examples of org.eclipse.jetty.start.UsageException


            }
                return;
        }

        // Anything else is unrecognized
        throw new UsageException(ERR_BAD_ARG,"Unrecognized argument: \"%s\" in %s",arg,source);
    }
View Full Code Here


    public static String getValue(String arg)
    {
        int idx = arg.indexOf('=');
        if (idx == (-1))
        {
            throw new UsageException(ERR_BAD_ARG,"Argument is missing a required value: %s",arg);
        }
        String value = arg.substring(idx + 1).trim();
        if (value.length() <= 0)
        {
            throw new UsageException(ERR_BAD_ARG,"Argument is missing a required value: %s",arg);
        }
        return value;
    }
View Full Code Here

                {
                    return new File(new URI(m.group(1))).getParentFile().toPath();
                }
                catch (URISyntaxException e)
                {
                    throw new UsageException(UsageException.ERR_UNKNOWN,e);
                }
            }
        }

        // Lastly, fall back to ${user.dir} default
View Full Code Here

    public void add(ConfigSource source) throws IOException
    {
        if (sources.contains(source))
        {
            // TODO: needs a better/more clear error message
            throw new UsageException(ERR_BAD_ARG,"Duplicate Configuration Source Reference: " + source);
        }
        sources.add(source);

        Collections.sort(sources,new WeightedConfigSourceComparator());
View Full Code Here

    private String getValue(String arg)
    {
        int idx = arg.indexOf('=');
        if (idx == (-1))
        {
            throw new UsageException(ERR_BAD_ARG,"Argument is missing a required value: %s",arg);
        }
        String value = arg.substring(idx + 1).trim();
        if (value.length() <= 0)
        {
            throw new UsageException(ERR_BAD_ARG,"Argument is missing a required value: %s",arg);
        }
        return value;
    }
View Full Code Here

    public void add(ConfigSource source) throws IOException
    {
        if (sources.contains(source))
        {
            // TODO: needs a better/more clear error message
            throw new UsageException(ERR_BAD_ARG,"Duplicate Configuration Source Reference: " + source);
        }
        sources.add(source);

        Collections.sort(sources,new WeightedConfigSourceComparator());
View Full Code Here

    private String getValue(String arg)
    {
        int idx = arg.indexOf('=');
        if (idx == (-1))
        {
            throw new UsageException(ERR_BAD_ARG,"Argument is missing a required value: %s",arg);
        }
        String value = arg.substring(idx + 1).trim();
        if (value.length() <= 0)
        {
            throw new UsageException(ERR_BAD_ARG,"Argument is missing a required value: %s",arg);
        }
        return value;
    }
View Full Code Here

            {
                arg = line.substring(0,idx);
            }
            if (BANNED_ARGS.contains(arg))
            {
                throw new UsageException(ERR_BAD_ARG,"%s not allowed in %s",arg,origin);
            }
            this.props.addPossibleProperty(line,origin);
        }
    }
View Full Code Here

            {
                arg = line.substring(0,idx);
            }
            if (BANNED_ARGS.contains(arg))
            {
                throw new UsageException(ERR_BAD_ARG,"%s not allowed in %s",arg,origin);
            }
            this.props.addPossibleProperty(line,origin);
        }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.start.UsageException

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.