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

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


    {
        Location l = mockLocation();

        replay();

        Throwable t = new TapestryException("Message", l, null);

        ExceptionAnalysis ea = _analyzer.analyze(t);

        assertEquals(ea.getExceptionInfos().size(), 1);
View Full Code Here


        Location l = mockLocation();

        replay();

        Throwable inner = new RuntimeException("Inner");
        Throwable middle = new TapestryException("Middle", l, inner);
        Throwable outer = new RuntimeException("Outer: Middle", middle);

        ExceptionAnalysis ea = _analyzer.analyze(outer);

        assertEquals(ea.getExceptionInfos().size(), 3);
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

        ComponentResources resources = container.getComponentResources();

        while (resources != null)
        {
            if (resources.getComponentModel().getComponentClassName().equals(componentClassName))
                throw new TapestryException(
                        ServicesMessages.componentRecursion(componentClassName), location, null);

            resources = resources.getContainerResources();
        }
    }
View Full Code Here

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

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

            // 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

    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

        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(elementName),
                    location, null);

        if (isComponent)
        {
            _tokens.add(new StartComponentToken(elementName, id, type, mixins, location));
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.