mirror of https://github.com/apache/jclouds.git
Added RateLimit exception
This commit is contained in:
parent
c6f2d84611
commit
a5ce5983a1
|
@ -0,0 +1,42 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.jclouds.rest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Thrown when a request fails because the rate limit has been exceeded.
|
||||||
|
*/
|
||||||
|
public class RateLimitExceededException extends RuntimeException {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public RateLimitExceededException() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public RateLimitExceededException(String message, Throwable cause) {
|
||||||
|
super(message, cause);
|
||||||
|
}
|
||||||
|
|
||||||
|
public RateLimitExceededException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public RateLimitExceededException(Throwable cause) {
|
||||||
|
super(cause);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -27,6 +27,7 @@ import org.jclouds.concurrent.TransformParallelException;
|
||||||
import org.jclouds.http.HttpResponseException;
|
import org.jclouds.http.HttpResponseException;
|
||||||
import org.jclouds.rest.AuthorizationException;
|
import org.jclouds.rest.AuthorizationException;
|
||||||
import org.jclouds.rest.InsufficientResourcesException;
|
import org.jclouds.rest.InsufficientResourcesException;
|
||||||
|
import org.jclouds.rest.RateLimitExceededException;
|
||||||
import org.jclouds.rest.ResourceAlreadyExistsException;
|
import org.jclouds.rest.ResourceAlreadyExistsException;
|
||||||
import org.jclouds.rest.ResourceNotFoundException;
|
import org.jclouds.rest.ResourceNotFoundException;
|
||||||
|
|
||||||
|
@ -135,6 +136,7 @@ public class Throwables2 {
|
||||||
ResourceAlreadyExistsException.class,
|
ResourceAlreadyExistsException.class,
|
||||||
ResourceNotFoundException.class,
|
ResourceNotFoundException.class,
|
||||||
InsufficientResourcesException.class,
|
InsufficientResourcesException.class,
|
||||||
|
RateLimitExceededException.class,
|
||||||
HttpResponseException.class);
|
HttpResponseException.class);
|
||||||
|
|
||||||
// Note this needs to be kept up-to-date with all top-level exceptions jclouds works against
|
// Note this needs to be kept up-to-date with all top-level exceptions jclouds works against
|
||||||
|
|
Loading…
Reference in New Issue