001    package org.springframework.richclient.exceptionhandling.delegation;
002    
003    /**
004     * Purges a throwable, ussually by looking into it's chain.
005     * Usefull for unwrapping WrapEverythingException etc.
006     * 
007     * @see DefaultExceptionPurger
008     * @author Geoffrey De Smet
009     * @since 0.3.0
010     */
011    public interface ExceptionPurger {
012    
013        /**
014         * Purges the throwable to unwrap it to find the most suitable throwable to evaluate or handle.
015         * 
016         * @param e the root exception or error
017         * @return e or a chained Throwable which is part of e's chain
018         */
019        Throwable purge(Throwable e);
020        
021    }