Package com.volantis.xml.expression

Examples of com.volantis.xml.expression.ExpressionException


                functionName,
                new Function() {
                    public Value invoke(ExpressionContext context,
                                        Value[] arguments)
                            throws ExpressionException {
                        throw new ExpressionException();
                    }
                });

        // Compile and execute the function
        Expression exp = compileExpression("function:test()");
View Full Code Here


public abstract class AbstractErrorFunction extends AbstractFunction {

    protected SAXParseException getException (ExpressionContext context) throws ExpressionException {
        TryModel model = (TryModel) ((SimpleExpressionContext) context).findObject(TryModel.class);
        if (model == null) {
            throw new ExpressionException("Error functions must be used inside try block.");
        }

        List exceptions = model.getExceptions();
        SAXParseException x = exceptions.isEmpty() ? null : (SAXParseException) exceptions.get(0);
        return x;   
View Full Code Here

        Object result = null;

        try {
            result = compiledExpression.getValue(jxpContext);
        } catch (JXPathException e) {
            throw new ExpressionException(e);
        } catch (ExtendedRuntimeException e) {
            // JXPath does not support the propogation of checked exceptions.
            // Therefore, we use our own ExtendedRuntimeException and propogate
            // that or its cause upwards.
            Throwable cause = e.getCause();
View Full Code Here

            return new JXPathExpression(
                    factory,
                    new JXPathCompiledExpression(expression, e));
        } catch (TokenMgrError tme) {
            // if parsing failed then throw an expression exception
            throw new ExpressionException(tme);
        } catch (JXPathException e) {
            // if parsing failed then throw an expression exception
            throw new ExpressionException(e);
        } catch (ParseException e) {
            LOGGER.error("exception-during-expression-parse", expression, e);
            throw new ExpressionException(e);
        }
    }
View Full Code Here

            };

            streamContents(handler);

        } catch (SAXException e) {
            throw new ExpressionException(e);
        }

        return output.toString();
    }
View Full Code Here

    // javadoc inherited
    public Value invoke(ExpressionContext expressionContext, Value[] values)
        throws ExpressionException {

        if (values.length != 1) {
            throw new ExpressionException(EXCEPTION_LOCALIZER.format(
                "invalid-num-of-args",
                new Object[]{
                    NAME,
                    new Integer(1),
                    new Integer(values.length)}));
View Full Code Here

     */
    public Value invoke(ExpressionContext context, Value[] arguments)
            throws ExpressionException {

        if (arguments.length > 1) {
            throw new ExpressionException(
                    EXCEPTION_LOCALIZER.format(
                            "invalid-num-args-range",
                            new Object[] {
                                    getName(),
                                    new Integer(0),
View Full Code Here

    // javadoc inherited
    public Value invoke(ExpressionContext expressionContext, Value[] values)
        throws ExpressionException {

        if (values.length != 1) {
            throw new ExpressionException(EXCEPTION_LOCALIZER.format(
                "invalid-num-of-args",
                new Object[]{
                    NAME,
                    new Integer(1),
                    new Integer(values.length)}));
View Full Code Here

    // javadoc inherited
    public Value invoke(ExpressionContext expressionContext, Value[] values)
        throws ExpressionException {

        if (values.length != 1) {
            throw new ExpressionException(EXCEPTION_LOCALIZER.format(
                "invalid-num-of-args",
                new Object[]{
                    NAME,
                    new Integer(1),
                    new Integer(values.length)}));
View Full Code Here

        String componentName = values[1].stringValue().asJavaString();

        Project project = application.getPredefinedProject(projectName);

        if (project == null) {
            throw new ExpressionException(
                    exceptionLocalizer.format("mcsi-policy-project-not-defined",
                                              projectName));
        }

        return createIdentityValue(expressionContext, project,  componentName);
View Full Code Here

TOP

Related Classes of com.volantis.xml.expression.ExpressionException

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.