Code example for CacheException

0
    public void evict(Object key) throws CacheException {
        try { 
            cache.remove( key ); 
        } 
        catch ( ClassCastException e ) {
            throw new CacheException( e );
        } 
        catch ( IllegalStateException e ) {
            throw new CacheException( e );
        } 
        catch ( net.sf.ehcache.CacheException e ) {
            if ( e instanceof NonStopCacheException ) {
                HibernateNonstopCacheExceptionHandler.getInstance() 
                        .handleNonstopCacheException( (NonStopCacheException) e );
            } 
            else { 
                throw new CacheException( e );
            } 
        } 
    } 
Connect your IDE to all the code out there  Get Codota for Java