Code example for CacheException

0
        ErrorHandler errorHandler; 
        try { 
            errorHandler = 
                    (ErrorHandler) Class.forName(errorHandlerName).newInstance();
        } catch (ClassNotFoundException e) {
            throw new CacheException(
                    "Unable to find error handler class [" + errorHandlerName + "]", e);
        } catch (IllegalAccessException e) {
            throw new CacheException(
                    "Illegally accessed error handler class [" + errorHandlerName + "]", e);
        } catch (InstantiationException e) { 
            throw new CacheException(
                    "Failed to instantiate error handler class [" + errorHandlerName + "]", e);
        } 
 
        return errorHandler; 
    } 
 
    public String[] getServers() {
        return properties.get(PROP_SERVERS, DEFAULT_SERVERS).split(" ");