Examples of InvalidReferenceException


Examples of freemarker.core.InvalidReferenceException

            num = ((TemplateNumberModel) model).getAsNumber();
        } catch (ClassCastException e) {
            throw new TemplateException(
                    "Expecting a number on the left side of ?c", env);
        } catch (NullPointerException e) {
            throw new InvalidReferenceException("Undefined number", env);
        }
        if (num instanceof Integer) {
            // We accelerate this fairly common case
            return new SimpleScalar(num.toString());
        } else {
View Full Code Here

Examples of freemarker.core.InvalidReferenceException

    }
    private void fillInDefaultsInternal(Environment env, Scope scope, Collection<String> paramNames) throws TemplateException {
       
        boolean resolvedAnArg, hasUnresolvedArg;
        Expression firstUnresolvedExpression;
        InvalidReferenceException firstReferenceException;
        do {
            firstUnresolvedExpression = null;
            firstReferenceException = null;
            resolvedAnArg = hasUnresolvedArg = false;
            for (String paramName : paramNames) {
View Full Code Here

Examples of freemarker.core.InvalidReferenceException

    public void execute(Environment env) throws TemplateException, IOException {
        String templateNameString = includedTemplateName.getStringValue(env);
        if( templateNameString == null ) {
            String msg = "Error " + getStartLocation()
                        + "The expression " + includedTemplateName + " is undefined.";
            throw new InvalidReferenceException(msg, env);
        }
        String enc = encoding;
        if (encoding == null && encodingExp != null) {
            enc = encodingExp.getStringValue(env);
        }
View Full Code Here

Examples of org.apache.tuscany.spi.loader.InvalidReferenceException

                    break;
                case END_ELEMENT:
                    if (SERVICE.equals(reader.getName())) {
                        if (binding != null) {
                            if (target == null) {
                                InvalidReferenceException e = new InvalidReferenceException("No target for service ");
                                e.setIdentifier(name);
                                throw e;
                            }
                            URI targetURI;
                            try {
                                targetURI = new URI(target);
                            } catch (URISyntaxException e) {
                                InvalidReferenceException ire = new InvalidReferenceException(target);
                                ire.setIdentifier(name);
                                throw ire;
                            }

                            // FIXME need a way to specify "remotable" on a service
                            return new BoundServiceDefinition<Binding>(name,
                                                                       serviceContract,
                                                                       false,
                                                                       binding,
                                                                       targetURI);
                        } else if (target != null) {
                            URI targetURI;
                            try {
                                targetURI = new URI(target);
                            } catch (URISyntaxException e) {
                                InvalidReferenceException ire = new InvalidReferenceException(target);
                                ire.setIdentifier(name);
                                throw ire;
                            }
                           
                            return new BindlessServiceDefinition(name, serviceContract, false, targetURI);
                        } else {
View Full Code Here

Examples of org.apache.tuscany.spi.loader.InvalidReferenceException

        String name = reader.getAttributeValue(null, "name");
        String text = reader.getElementText();
        String target = text != null ? text.trim() : null;

        if (name == null || target == null) {
            InvalidReferenceException le = new InvalidReferenceException();
            le.setIdentifier(target);
            throw le;
        }

        ReferenceTarget referenceTarget = new ReferenceTarget();
        referenceTarget.setReferenceName(name);
        try {
            referenceTarget.addTarget(new URI(target));
        } catch (URISyntaxException e) {
            InvalidReferenceException le = new InvalidReferenceException(e);
            le.setIdentifier(target);
            throw le;
        }
        componentDefinition.add(referenceTarget);
    }
View Full Code Here

Examples of org.auraframework.throwable.quickfix.InvalidReferenceException

    public void validateReferences() throws QuickFixException {
      EventDef event = null;
        if (name == null && descriptor != null) {
            event = descriptor.getDef();
            if (event == null) {
                throw new InvalidReferenceException(String.format("aura:handler has invalid event attribute value: %s",
                        descriptor), getLocation());
            }
           
            if (!event.getEventType().equals(EventType.APPLICATION)) {
                throw new InvalidReferenceException(
                        "A aura:handler that specifies an event=\"\" attribute must handle an application event. Either change the aura:event to have type=\"APPLICATION\" or alternately change the aura:handler to specify a name=\"\" attribute.",
                        getLocation());
            }
        } else if (name != null && descriptor == null && value == null) {
            RootDefinition parentDef = parentDescriptor.getDef();
            Map<String, RegisterEventDef> events = parentDef.getRegisterEventDefs();
            RegisterEventDef registerEvent = events.get(name);
            if (registerEvent == null) {
                throw new InvalidReferenceException(String.format("aura:handler has invalid name attribute value: %s",
                        name), getLocation());
            }
           
            event = registerEvent.getDescriptor().getDef();
            if (!event.getEventType().equals(EventType.COMPONENT)) {
                throw new InvalidReferenceException(
                        "A aura:handler that specifies a name=\"\" attribute must handle a component event. Either change the aura:event to have type=\"COMPONENT\" or alternately change the aura:handler to specify an event=\"\" attribute.",
                        getLocation());
            }
        }
       
View Full Code Here

Examples of org.auraframework.throwable.quickfix.InvalidReferenceException

                "attributes").getValue();

        for (DefDescriptor<AttributeDef> at : lazyAttributes.keySet()) {
            AttributeDef other = def.getAttributeDef(at.getName());
            if (other == null) {
                throw new InvalidReferenceException(String.format("Attribute %s does not exist", at.getName()),
                        getLocation());
            }
            DefDescriptor<TypeDef> otherType = other.getTypeDef().getDescriptor();
            if (!(otherType.getPrefix().equals("aura") && acceptableAttributeTypes.contains(otherType.getName()))) {
                throw new InvalidReferenceException(
                        String.format(
                                "Lazy Component References can only have attributes of simple types passed in (%s is not simple)",
                                at.getName()), getLocation());
            }
        }
View Full Code Here

Examples of org.ryant.tubesock.api.exception.InvalidReferenceException

                log.debug("Good hash confirmed from server");
            }
            else
            {
                log.debug("Invalid hash: The server did not recognise this hash");
                throw new InvalidReferenceException("The server did not recognise this hash: " + reference.getHash());
            }
        }
        catch (ClassNotFoundException e)
        {
            throw new IOException("Unable to locate class from stream", e);
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.