Change exception message for wrong timeout in azure repository settings

Backport in master this change: https://github.com/elastic/elasticsearch/pull/15950#discussion-diff-50128378

Related to #15080
Related to #15950
This commit is contained in:
David Pilato 2016-01-19 17:43:30 +01:00
parent 98f9222fff
commit 6db5b5033c
1 changed files with 2 additions and 1 deletions

View File

@ -125,7 +125,8 @@ public class AzureStorageServiceImpl extends AbstractLifecycleComponent<AzureSto
int timeout = (int) azureStorageSettings.getTimeout().getMillis(); int timeout = (int) azureStorageSettings.getTimeout().getMillis();
client.getDefaultRequestOptions().setTimeoutIntervalInMs(timeout); client.getDefaultRequestOptions().setTimeoutIntervalInMs(timeout);
} catch (ClassCastException e) { } catch (ClassCastException e) {
throw new IllegalArgumentException("Can not cast [" + azureStorageSettings.getTimeout() + "] to int."); throw new IllegalArgumentException("Can not convert [" + azureStorageSettings.getTimeout() +
"]. It can not be longer than 2,147,483,647ms.");
} }
return client; return client;
} }