Search in sources :

Example 1 with EStorageConfig

use of com.accenture.trac.common.exception.EStorageConfig in project tracdap by finos.

the class TracDataService method checkDefaultStorageAndFormat.

private void checkDefaultStorageAndFormat(IStorageManager storage, ICodecManager formats, DataServiceConfig config) {
    try {
        storage.getFileStorage(config.getDefaultStorageKey());
        storage.getDataStorage(config.getDefaultStorageKey());
        formats.getCodec(config.getDefaultStorageFormat());
    } catch (EStorageConfig e) {
        var msg = String.format("Storage not configured for default storage key: [%s]", config.getDefaultStorageKey());
        log.error(msg);
        throw new EStartup(msg, e);
    } catch (EPluginNotAvailable e) {
        var msg = String.format("Codec not available for default storage format: [%s]", config.getDefaultStorageFormat());
        log.error(msg);
        throw new EStartup(msg, e);
    }
}
Also used : EPluginNotAvailable(com.accenture.trac.common.exception.EPluginNotAvailable) EStorageConfig(com.accenture.trac.common.exception.EStorageConfig) EStartup(com.accenture.trac.common.exception.EStartup)

Aggregations

EPluginNotAvailable (com.accenture.trac.common.exception.EPluginNotAvailable)1 EStartup (com.accenture.trac.common.exception.EStartup)1 EStorageConfig (com.accenture.trac.common.exception.EStorageConfig)1