Examples of ExpressionException


Examples of com.volantis.xml.expression.ExpressionException

     * @param actualCount actual number of arguments
     * @throws ExpressionException if validation of arguments fails
     */
    static void checkArgumentsCount(String functionName, int expectedCount, int actualCount) throws ExpressionException {
        if (actualCount != expectedCount) {
            throw new ExpressionException(EXCEPTION_LOCALIZER.format(
                    "invalid-num-args",
                    new Object[]{
                        functionName,
                        new Integer(expectedCount),
                        new Integer(actualCount)}));
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionException

    // javadoc inherited
    public Value invoke(ExpressionContext context, Value[] args)
            throws ExpressionException {
        if ((args.length != 2)) {
            throw new ExpressionException(
                    EXCEPTION_LOCALIZER.format(
                            "invalid-num-of-args",
                            new Object[]{new Integer(args.length),
                                    new Integer(2)}));
        }
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionException

    // javadoc inherited
    public Value invoke(ExpressionContext context, Value[] args)
            throws ExpressionException {
        if ((args.length != 2)) {
            throw new ExpressionException(
                    EXCEPTION_LOCALIZER.format(
                            "invalid-num-of-args",
                            new Object[]{new Integer(args.length),
                                    new Integer(2)}));
        }

        Value result = Sequence.EMPTY;

        if (args[0] != Sequence.EMPTY && args[1] != Sequence.EMPTY) {
            final String strToTokenize =
                    args[0].stringValue().asJavaString();
            final String pattern =
                    args[1].stringValue().asJavaString();

            if (pattern.length() == 0) {
                throw new ExpressionException(INVALID_PATTERN_MSG);
            }

            if (strToTokenize.length() == 0) {
                // If there is no input string, return the empty sequence.
                result = Sequence.EMPTY;
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionException

        throws ExpressionException {
        // We need at least 1 parameter
        if ((values == null) || (values.length < 1)) {
            logger.error("invalid-getInstance-call", new Object[] {namespace.getName()});

            throw new ExpressionException(
                    "Call to get" +  namespace.getName() + "Instance with no " +
                    "arguments.");
        }

        // Extract the mariner request context from the expression context and
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionException

        }

        if (formatIndex == -1) {
            logger.error("invalid-format-index", new Object[]{value.stringValue().asJavaString()});

            throw new ExpressionException(value.stringValue().asJavaString() +
                    " is not a valid format index.");
        }

        return formatIndex;
    }
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionException

        if ((values != null) && (values.length > 0)) {
            // Ensure that the name is always in string form
            name = values[0].stringValue().asJavaString();
        } else {
            throw new ExpressionException(
                getFunctionName() + " must be invoked with at least one name" +
                "value (and optionally with a default value)");
        }

        if (values.length > 1) {
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionException

     * {@inheritDoc}
     */
    public Value invoke(ExpressionContext context, Value[] arguments)
            throws ExpressionException {
        if (arguments.length != 2) {
            throw new ExpressionException(
                    EXCEPTION_LOCALIZER.format(
                            "invalid-num-args",
                            new Object[] {
                                    NAME,
                                    new Integer(2),
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionException

     * {@inheritDoc}
     */
    public Value invoke(ExpressionContext context, Value[] arguments)
            throws ExpressionException {
        if (arguments.length != 2) {
            throw new ExpressionException(
                    EXCEPTION_LOCALIZER.format(
                            "invalid-num-args",
                            new Object[] {
                                    NAME,
                                    new Integer(2),
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionException

     * {@inheritDoc}
     */
    public Value invoke(ExpressionContext context, Value[] arguments)
            throws ExpressionException {
        if (arguments.length != 2) {
            throw new ExpressionException(
                    EXCEPTION_LOCALIZER.format(
                            "invalid-num-args",
                            new Object[] {
                                    NAME,
                                    new Integer(2),
View Full Code Here

Examples of edu.mit.simile.backstage.model.data.ExpressionException

            builder,
            itemVar
        );
       
        if (!(result.valueExpr instanceof Var)) {
            throw new ExpressionException("Facet expression does not evaluate to a Var");
        }
       
        ValueExpr input = result.valueExpr;
        ValueExpr condition = null;
       
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.