Catch the exception you get when you try to read from a cache with an invalid state, and re-throw a more helpful error message

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19127 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2010-03-08 17:14:19 +00:00
parent db196b51d5
commit d2c2565599

View File

@@ -88,6 +88,13 @@ public class EhCacheAdapter<K extends Serializable, V extends Object>
return null;
}
}
catch (IllegalStateException ie)
{
throw new AlfrescoRuntimeException("Failed to get from EhCache as state invalid: \n" +
" state: " + cache.getStatus() + "\n" +
" key: " + key,
ie);
}
catch (CacheException e)
{
throw new AlfrescoRuntimeException("Failed to get from EhCache: \n" +