Package org.apache.tapestry.ioc.internal.util

Examples of org.apache.tapestry.ioc.internal.util.TapestryException


            // Some parsers get in an unknown state when an error occurs, and are are not
            // subsequently useable.

            _reader = null;

            throw new TapestryException(ServicesMessages.templateParseError(templateResource, ex),
                    getCurrentLocation(), ex);
        }
        finally
        {
            reset();
View Full Code Here


        boolean isComponent = (id != null || type != null);

        // If provided t:mixins but not t:id or t:type, then its not quite a component

        if (mixins != null && !isComponent)
            throw new TapestryException(ServicesMessages.mixinsInvalidWithoutIdOrType(localName),
                    location, null);

        if (isComponent)
        {
            _tokens.add(new StartComponentToken(localName, id, type, mixins, location));
View Full Code Here

        {
            startBlock(attributes);
            return;
        }

        throw new TapestryException(ServicesMessages.undefinedTapestryElement(qname),
                getCurrentLocation(), null);
    }
View Full Code Here

    private void startParameter(Attributes attributes)
    {
        String parameterName = findSingleParameter("parameter", "name", attributes);

        if (InternalUtils.isBlank(parameterName))
            throw new TapestryException(ServicesMessages.parameterElementNameRequired(),
                    getCurrentLocation(), null);

        _tokens.add(new ParameterToken(parameterName, getCurrentLocation()));
    }
View Full Code Here

                continue;
            }

            // Only the name attribute is allowed.

            throw new TapestryException(ServicesMessages.undefinedTapestryAttribute(
                    elementName,
                    name,
                    attributeName), getCurrentLocation(), null);
        }
View Full Code Here

            attributeTokens.add(new AttributeToken(name, value, location));
        }

        if (id == null && type == null)
            throw new TapestryException(ServicesMessages.compRequiresIdOrType(), location, null);

        if (id != null)
            _componentIds.add(id);

        // Add the component
View Full Code Here

            return _typeCoercer.coerce(boundValue, expectedType);
        }
        catch (Exception ex)
        {
            throw new TapestryException(StructureMessages.getParameterFailure(
                    parameterName,
                    getCompleteId(),
                    ex), ex);
        }
    }
View Full Code Here

            b.set(coerced);
        }
        catch (Exception ex)
        {
            throw new TapestryException(StructureMessages.writeParameterFailure(
                    parameterName,
                    getCompleteId(),
                    ex), InternalUtils.locationOf(b), ex);
        }
    }
View Full Code Here

                finalClassName = _componentClassResolver
                        .resolveComponentTypeToClassName(componentType);
            }
            catch (IllegalArgumentException ex)
            {
                throw new TapestryException(ex.getMessage(), location, ex);
            }
        }

        Instantiator instantiator = _componentInstantiatorSource.findInstantiator(finalClassName);
View Full Code Here

     * @throws TapestryException
     *             always
     */
    public void set(Object value)
    {
        throw new TapestryException(BindingsMessages.bindingIsReadOnly(this), this, null);
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.ioc.internal.util.TapestryException

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.