Package org.apache.hivemind

Examples of org.apache.hivemind.ErrorHandler


    }

    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

    public void testMissingSubModule() throws Exception
    {
        Resource location = getResource("MissingSubModule.xml");

        ErrorHandler eh = new ErrorHandlerFixture();

        RegistryAssemblyImpl assembly = new RegistryAssemblyImpl(eh);

        DescriptorParser p = new DescriptorParser(eh, assembly);
View Full Code Here

     *
     * @since 4.0
     */
    protected Registry constructRegistry(ServletConfig config)
    {
        ErrorHandler errorHandler = constructErrorHandler(config);

        RegistryBuilder builder = new RegistryBuilder(errorHandler);

        builder.addModuleDescriptorProvider(new XmlModuleDescriptorProvider(_resolver));

View Full Code Here

            PropertyUtils.write(target, _propertyName, finalValue);

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

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

            PropertyUtils.write(target, _propertyName, finalValue);
        }
        catch (Exception ex)
        {
            ErrorHandler eh = processor.getContributingModule().getErrorHandler();

            String message = RulesMessages.unableToSetProperty(_propertyName, target, ex);

            eh.error(LOG, message, element.getLocation(), ex);
        }

    }
View Full Code Here

            PropertyUtils.write(target, _propertyName, finalValue);
        }
        catch (Exception ex)
        {
            ErrorHandler eh = processor.getContributingModule().getErrorHandler();

            eh.error(
                LOG,
                RulesMessages.readContentFailure(processor, element, ex),
                element.getLocation(),
                ex);
        }
View Full Code Here

     *
     * @since 4.0
     */
    protected Registry constructRegistry(ServletConfig config)
    {
        ErrorHandler errorHandler = constructErrorHandler(config);

        RegistryBuilder builder = new RegistryBuilder(errorHandler);

        builder.addModuleDescriptorProvider(new XmlModuleDescriptorProvider(_resolver));

View Full Code Here

        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

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.