mirror of https://github.com/apache/jclouds.git
Merge pull request #131 from andrewgaul/propagate-exceptions
Propagate exceptions
This commit is contained in:
commit
32a968e263
|
@ -86,7 +86,7 @@ public class AtmosUtils {
|
||||||
throw new IllegalStateException(path + " still exists after deleting!");
|
throw new IllegalStateException(path + " still exists after deleting!");
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
new IllegalStateException(path + " interrupted during deletion!", e);
|
throw new IllegalStateException(path + " interrupted during deletion!", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,7 @@ public class S3BlobStore extends BaseBlobStore {
|
||||||
throw new IllegalStateException(container + " still exists after deleting!");
|
throw new IllegalStateException(container + " still exists after deleting!");
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
new IllegalStateException(container + " interrupted during deletion!", e);
|
throw new IllegalStateException(container + " interrupted during deletion!", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -500,7 +500,7 @@ public class TransientAsyncBlobStore extends BaseAsyncBlobStore {
|
||||||
checkArgument(in != null, "blob must be set");
|
checkArgument(in != null, "blob must be set");
|
||||||
ConcurrentMap<String, Blob> container = getContainerToBlobs().get(containerName);
|
ConcurrentMap<String, Blob> container = getContainerToBlobs().get(containerName);
|
||||||
if (container == null) {
|
if (container == null) {
|
||||||
new IllegalStateException("containerName not found: " + containerName);
|
return Futures.immediateFailedFuture(new IllegalStateException("containerName not found: " + containerName));
|
||||||
}
|
}
|
||||||
|
|
||||||
Blob blob = createUpdatedCopyOfBlobInContainer(containerName, in);
|
Blob blob = createUpdatedCopyOfBlobInContainer(containerName, in);
|
||||||
|
@ -513,7 +513,7 @@ public class TransientAsyncBlobStore extends BaseAsyncBlobStore {
|
||||||
public ListenableFuture<Blob> putBlobAndReturnOld(String containerName, Blob in) {
|
public ListenableFuture<Blob> putBlobAndReturnOld(String containerName, Blob in) {
|
||||||
ConcurrentMap<String, Blob> container = getContainerToBlobs().get(containerName);
|
ConcurrentMap<String, Blob> container = getContainerToBlobs().get(containerName);
|
||||||
if (container == null) {
|
if (container == null) {
|
||||||
new IllegalStateException("containerName not found: " + containerName);
|
return Futures.immediateFailedFuture(new IllegalStateException("containerName not found: " + containerName));
|
||||||
}
|
}
|
||||||
|
|
||||||
Blob blob = createUpdatedCopyOfBlobInContainer(containerName, in);
|
Blob blob = createUpdatedCopyOfBlobInContainer(containerName, in);
|
||||||
|
|
|
@ -290,7 +290,7 @@ public abstract class BaseAsyncBlobStore implements AsyncBlobStore {
|
||||||
throw new IllegalStateException(container + " still exists after deleting!");
|
throw new IllegalStateException(container + " still exists after deleting!");
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
new IllegalStateException(container + " interrupted during deletion!", e);
|
throw new IllegalStateException(container + " interrupted during deletion!", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -218,7 +218,7 @@ public abstract class BaseBlobStore implements BlobStore {
|
||||||
throw new IllegalStateException(container + " still exists after deleting!");
|
throw new IllegalStateException(container + " still exists after deleting!");
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
new IllegalStateException(container + " interrupted during deletion!", e);
|
throw new IllegalStateException(container + " interrupted during deletion!", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue