Package org.apache.hivemind

Examples of org.apache.hivemind.ErrorHandler


    }

    public void testConditionalExpressionError()
    {
        MockControl ehControl = newControl(ErrorHandler.class);
        ErrorHandler eh = (ErrorHandler) ehControl.getMock();

        RegistryDefinition definition = new RegistryDefinitionImpl();

        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


        TranslatorContribution tc = new TranslatorContribution();
        tc.setName("invalid");

        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

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

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

        MockControl pc = newControl(ServiceImplementationFactoryParameters.class);
        ServiceImplementationFactoryParameters p = (ServiceImplementationFactoryParameters) pc
                .getMock();
View Full Code Here

    public void testAutowire()
    {
        ServiceImplementationFactoryParameters fp = newParameters();
        Module module = newModule();
        ErrorHandler eh = newErrorHandler();
        Log log = newLog();
        Messages messages = newMessages();
        ErrorLog errorLog = newErrorLog();

        // Normally I try and get all the invocations into chronological
View Full Code Here

    public void testBasicScript() throws Exception
    {
        GroovyModuleDescriptorProvider provider = new GroovyModuleDescriptorProvider(
                getClassResolver(), getResource("basic.groovy"));

        ErrorHandler errorHandler = new DefaultErrorHandler();

        List descriptors = provider.getModuleDescriptors(errorHandler);

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

        resources.add(getResource("calculator.groovy"));

        GroovyModuleDescriptorProvider provider = new GroovyModuleDescriptorProvider(
                getClassResolver(), resources);

        ErrorHandler errorHandler = new DefaultErrorHandler();

        List descriptors = provider.getModuleDescriptors(errorHandler);

        assertEquals(2, descriptors.size());
    }
View Full Code Here

     */
    public void _testLinePreciseErrorReporting() throws Exception
    {
        Resource resource = getResource("missingModuleId.groovy");

        ErrorHandler handler = new DefaultErrorHandler();
        DescriptorParser parser = new DescriptorParser(handler);

        parser.initialize(resource, getClassResolver());

        GroovyCodeSource source = new GroovyCodeSource(resource.getResourceURL());
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,
                    element,
                    ex), element.getLocation(), ex);
View Full Code Here

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

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

        MockControl pc = newControl(ServiceImplementationFactoryParameters.class);
        ServiceImplementationFactoryParameters p = (ServiceImplementationFactoryParameters) pc
                .getMock();
View Full Code Here

                .getMock();

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

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

        MockControl logc = newControl(Log.class);
        Log log = (Log) logc.getMock();

        MockControl messagesControl = newControl(Messages.class);
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.