[CORE] Add feature getter on LicenseExpiredException

Original commit: elastic/x-pack-elasticsearch@a04b73ff00
This commit is contained in:
Areek Zillur 2014-11-14 19:26:18 -05:00
parent a397019139
commit f6a2a690b2
1 changed files with 7 additions and 0 deletions

View File

@ -13,12 +13,19 @@ import org.elasticsearch.rest.RestStatus;
*/
public class LicenseExpiredException extends ElasticsearchException {
private final String feature;
public LicenseExpiredException(String feature) {
super("license expired for feature [" + feature + "]");
this.feature = feature;
}
@Override
public RestStatus status() {
return RestStatus.UNAUTHORIZED;
}
public String feature() {
return feature;
}
}