Package org.apache.hivemind

Examples of org.apache.hivemind.ErrorHandler


        verifyControls();
    }

    public void testUnknownPrereq() throws Exception
    {
        ErrorHandler eh = (ErrorHandler) newMock(ErrorHandler.class);

        eh.error(LOG, "Unknown cartoon character dependency 'charlie' (for 'fred').", null, null);

        replayControls();

        Orderer o = new Orderer(LOG, eh, "cartoon character");
View Full Code Here


        verifyControls();
    }

    public void testUnknownPostreq() throws Exception
    {
        ErrorHandler eh = (ErrorHandler) newMock(ErrorHandler.class);

        eh.error(LOG, "Unknown cartoon character dependency 'dino' (for 'betty').", null, null);

        replayControls();

        Orderer o = new Orderer(LOG, eh, "cartoon character");
View Full Code Here

    }

    public void testCyclePre() throws Exception
    {
        MockControl c = newControl(ErrorHandler.class);
        ErrorHandler eh = (ErrorHandler) c.getMock();

        eh.error(
            LOG,
            "Unable to order cartoon character 'wilma' due to dependency cycle:"
                + " A cycle has been detected from the initial goal [wilma]",
            null,
            new CyclicGoalChainException(new Goal("")));
View Full Code Here

    }

    public void testCyclePost() throws Exception
    {
        MockControl c = newControl(ErrorHandler.class);
        ErrorHandler eh = (ErrorHandler) c.getMock();

        eh.error(
            LOG,
            "Unable to order cartoon character 'betty' due to dependency cycle: A cycle has been detected from the initial goal [fred]",
            null,
            new CyclicGoalChainException(new Goal("")));
View Full Code Here

    public void testBuilderErrorHandlerFacet()
    {
        MockControl c = newControl(Module.class);
        Module m = (Module) c.getMock();

        ErrorHandler eh = new DefaultErrorHandler();

        m.getErrorHandler();
        c.setReturnValue(eh);

        replayControls();
View Full Code Here

        p.addProperty(new BuilderServiceIdFacet());

        MockControl c = newControl(Module.class);
        Module module = (Module) c.getMock();

        ErrorHandler eh = new DefaultErrorHandler();
        ClassResolver cr = new DefaultClassResolver();

        MockControl messagesControl = newControl(Messages.class);
        Messages messages = (Messages) messagesControl.getMock();
View Full Code Here

        List parameters)
    {
        HiveMind.checkFactoryParameterCount(POINT_ID, parameters, 1);

        Log log = LogFactory.getLog(serviceId);
        ErrorHandler errorHandler = invokingModule.getErrorHandler();

        BuilderParameter parameter = (BuilderParameter) parameters.get(0);

        Object result = instantiateCoreServiceInstance(serviceId, invokingModule, parameter);
View Full Code Here

        catch (Exception ex)
        {
            // Have to decide if we need to display the location of the rule
            // or the element.

            ErrorHandler errorHandler = processor.getContributingModule().getErrorHandler();
            errorHandler.error(
                LOG,
                RulesMessages.unableToSetElementProperty(
                    propertyName,
                    target,
                    processor,
View Full Code Here

    }

    public void testTerminatorConflict()
    {
        MockControl c = newControl(ErrorHandler.class);
        ErrorHandler eh = (ErrorHandler) c.getMock();

        Log log = getLog();

        eh.error(
            log,
            "Terminator ss2 for pipeline service foo.bar conflicts with "
                + "previous terminator (ss1, at unknown location) and has been ignored.",
            null,
            null);
View Full Code Here

        verifyControls();
    }

    public void testIncorrectTerminatorType()
    {
        ErrorHandler eh = getErrorHandler();
        Log log = getLog();

        eh.error(
            log,
            "-String- is not an instance of interface "
                + "org.apache.hivemind.lib.pipeline.StandardService suitable for "
                + "use as part of the pipeline for service foo.bar.",
            null,
View Full Code Here

TOP

Related Classes of org.apache.hivemind.ErrorHandler

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.