Merge pull request #131 from andrewgaul/propagate-exceptions

Propagate exceptions
This commit is contained in:
Adrian Cole 2011-11-10 00:17:23 -08:00
commit 32a968e263
5 changed files with 6 additions and 6 deletions

View File

@ -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);
} }
} }

View File

@ -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);
} }
} }

View File

@ -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);

View File

@ -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);
} }
} }

View File

@ -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);
} }
} }