Examples of ChainPart


Examples of org.springframework.richclient.exceptionhandling.delegation.ChainInspectingExceptionHandlerDelegate.ChainPart

   
    public void testChainInpstectingDelegation() {
        DelegatingExceptionHandler delegatingExceptionHandler = new DelegatingExceptionHandler();
        List<ExceptionHandlerDelegate> delegateList = new LinkedList<ExceptionHandlerDelegate>();
        List<ChainPart> chainPartList = new ArrayList<ChainPart>();
        chainPartList.add(new ChainPart(IllegalArgumentException.class, 0, 2));
        chainPartList.add(new ChainPart(IllegalStateException.class, 1));
        ExceptionHandlerCounter chainCounter = new ExceptionHandlerCounter();
        delegateList.add(new ChainInspectingExceptionHandlerDelegate(chainPartList, chainCounter));
        List<ChainPart> cornerChainPartList = new ArrayList<ChainPart>();
        cornerChainPartList.add(new ChainPart(NumberFormatException.class));
        ExceptionHandlerCounter cornerCounter = new ExceptionHandlerCounter();
        delegateList.add(new ChainInspectingExceptionHandlerDelegate(cornerChainPartList, cornerCounter));
        ExceptionHandlerCounter runtimeCounter = new ExceptionHandlerCounter();
        delegateList.add(new SimpleExceptionHandlerDelegate(RuntimeException.class, runtimeCounter));
        delegatingExceptionHandler.setDelegateList(delegateList);
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.