Package org.auraframework.throwable

Examples of org.auraframework.throwable.AuraRuntimeException


                writer.write(code);
            }finally{
                writer.close();
            }
        }catch(IOException e){
            throw new AuraRuntimeException(e);
        }
        return "[Import(\""+path+"\")]";
    }
View Full Code Here


        String defaultValue = (String) getAttributes().get("defaultValue");
        DefDescriptor<?> desc = Aura.getDefinitionService().getDefDescriptor(descriptor, ThemeDef.class);
        Source<?> source = Aura.getContextService().getCurrentContext().getDefRegistry().getSource(desc);

        if ("".equals(name)) {
            throw new AuraRuntimeException("Cannot leave the name field blank");
        }

        if ((AuraTextUtil.validateAttributeName(name)) != true) {
            throw new AuraRuntimeException("Invalid var name:'" + name
                    + "', Refer to Auradocs for valid attribute names");
        }

        if (!source.exists()) {
            throw new AuraError("Cannot find source for " + desc.getQualifiedName());
View Full Code Here

        XPath xpath = factory.newXPath();
        XPathExpression expr = xpath.compile(xPathExpr);
        NodeList nodes = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);
        if (nodes == null || nodes.getLength() == 0) {
            // FIXME: EXCEPTIONINFO
            throw new AuraRuntimeException(String.format("Unable to find node: %s", xPathExpr));
        }
        return nodes.item(0);
    }
View Full Code Here

    /**
     * start processing a component.
     */
    public void popInstance(Instance<?> instance) {
        if (current.instance != instance) {
            throw new AuraRuntimeException("mismatched instance pop");
        }
        if (topUnprivileged == instance) {
            topUnprivileged = null;
        }
        current = stack.remove(stack.size() - 1);
View Full Code Here

     * the correct point.
     */
    public void markParent(Instance<?> parent) {
        if (!current.top) {
            if (current.instance != parent) {
                throw new AuraRuntimeException("Don't know how to handle setAttribute here");
            }
            current.count += 1;
        } else {
            path.setLength(0);
            path.append(parent.getPath());
View Full Code Here

    /**
     * Clear the parent previously marked.
     */
    public void clearParent(Instance<?> parent) {
        if (current.instance != parent) {
            throw new AuraRuntimeException("mismatched clear parent");
        }
        if (current.count > 0) {
            current.count -= 1;
        } else {
            popInstance(parent);
View Full Code Here

     * name (i.e. $ for super class). Note that you _must_ clear the name after
     * setting it.
     */
    public void setAttributeName(String name) {
        if (current.name != null || current.top) {
            throw new AuraRuntimeException("Setting name illegally");
        }
        current.name = name;
        path.append("/");
        if (name.equals("body")) {
            path.append("*");
 
View Full Code Here

    /**
     * pop a previously pushed name off the stack.
     */
    public void clearAttributeName(String name) {
        if (!name.equals(current.name)) {
            throw new AuraRuntimeException("mismatched clearAttributeName for " + name);
        }
        current.name = null;
        path.setLength(current.startPos);
    }
View Full Code Here

     * This must be pushed on to a 'name', as there is no way to index anything
     * else.
     */
    public void setAttributeIndex(int index) {
        if (current.name == null) {
            throw new AuraRuntimeException("no name when index set");
        }
        if (current.index != -1) {
            throw new AuraRuntimeException("missing clearAttributeIndex");
        }
        current.index = index;
        path.append("[");
        path.append(index);
        path.append("]");
View Full Code Here

    /**
     * pop a previously pushed index off the stack.
     */
    public void clearAttributeIndex(int index) {
        if (current.index != index) {
            throw new AuraRuntimeException("mismatched clearAttributeIndex");
        }
        current.index = -1;
        path.setLength(current.namePos);
    }
View Full Code Here

TOP

Related Classes of org.auraframework.throwable.AuraRuntimeException

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.