Package org.apache.hivemind

Examples of org.apache.hivemind.ErrorHandler.error()


        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


    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

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

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

        {
            // 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,
                    element,
                    ex), element.getLocation(), ex);
View Full Code Here

        }
        catch (Exception ex)
        {
            ErrorHandler eh = processor.getContributingModule().getErrorHandler();

            eh.error(LOG, RulesMessages
                    .readAttributeFailure(_attributeName, element, processor, ex), element
                    .getLocation(), ex);
        }

    }
View Full Code Here

        // Training

        source.valueForSymbol("symbol");
        control.setReturnValue(null);

        eh.error(
            LogFactory.getLog(SymbolExpanderImpl.class),
            XmlImplMessages.noSuchSymbol("symbol"),
            l,
            null);
View Full Code Here

        replayControls();

        ErrorHandler eh = new DefaultErrorHandler();

        eh.error(log, "Bad frob value.", l, ex);

        verifyControls();
    }

    public void testDefaultErrorHandlerWithNoLocation()
View Full Code Here

        replayControls();

        ErrorHandler eh = new DefaultErrorHandler();

        eh.error(log, "Bad frob value.", null, ex);

        verifyControls();
    }

    public void testStrictErrorHandler()
View Full Code Here

        ErrorHandler eh = new StrictErrorHandler();
        Throwable cause = new NullPointerException();

        try
        {
            eh.error(null, "An error message.", null, cause);
            unreachable();
        }
        catch (ApplicationRuntimeException ex)
        {
            assertEquals("Error: An error message.", ex.getMessage());
View Full Code Here

        Throwable cause = new NullPointerException();
        Location l = newLocation();

        try
        {
            eh.error(null, "An error message.", l, cause);
            unreachable();
        }
        catch (ApplicationRuntimeException ex)
        {
            assertEquals("Error at " + l + ": An error message.", ex.getMessage());
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.