Package org.apache.hivemind

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


    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


    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 object [wilma]",
                null,
                new ApplicationRuntimeException(""));
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 object [fred]",
                        null,
                        new ApplicationRuntimeException(""));
View Full Code Here

        RegistryDefinition definition = new RegistryDefinitionImpl();

        Location l = newLocation();

        errorHandler.error(
                log,
                XmlImplMessages.schemaNotVisible("foo.bar.Baz", "zip.zoop"),
                l,
                null);
View Full Code Here

        RegistryDefinition definition = new RegistryDefinitionImpl();

        Location l = newLocation();

        errorHandler.error(log, XmlImplMessages.unableToResolveSchema("foo.bar.Baz"), l, null);

        replayControls();

        ModuleDescriptor zipZoop = new ModuleDescriptor(null, errorHandler);
        zipZoop.setModuleId("zip.zoop");
View Full Code Here

        Log log = LogFactory.getLog(XmlModuleDescriptorProcessor.class);

        Location location = newLocation();

        eh.error(
                log,
                "Unexpected token <AND> in expression 'and class foo'.",
                location,
                new RuntimeException());
        ehControl.setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[]
View Full Code Here

        List l = Collections.singletonList(tc);

        ErrorHandler eh = (ErrorHandler) newMock(ErrorHandler.class);

        eh
                .error(
                        TranslatorManagerImpl.LOG,
                        "Translator contribution 'invalid' must specify either the service-id or class attribute.",
                        null,
                        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

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.