Package com.jamieallen.sdisruptor

Examples of com.jamieallen.sdisruptor.ExceptionHandler


    @Test
    public void shouldCallExceptionHandlerOnUncaughtException()
        throws Exception
    {
        final Exception ex = new Exception();
        final ExceptionHandler exceptionHandler = context.mock(ExceptionHandler.class);
        batchConsumer.exceptionHandler_(exceptionHandler);

        context.checking(new Expectations()
        {
            {
View Full Code Here


            {
                oneOf(logger).log(Level.INFO, "Exception processing: " + entry, ex);
            }
        });

        ExceptionHandler exceptionHandler = new IgnoreExceptionHandler(logger);
        exceptionHandler.handle(ex, entry);
    }
View Full Code Here

            {
                oneOf(logger).log(Level.SEVERE, "Exception processing: " + entry, causeException);
            }
        });

        ExceptionHandler exceptionHandler = new FatalExceptionHandler(logger);

        try
        {
            exceptionHandler.handle(causeException, entry);
        }
        catch (RuntimeException ex)
        {
            Assert.assertEquals(causeException, ex.getCause());
        }
View Full Code Here

TOP

Related Classes of com.jamieallen.sdisruptor.ExceptionHandler

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.