Propagate exceptions

Caught TransientAsyncBlobStore errors by visual inspection, the rest
with grep.
This commit is contained in:
Andrew Gaul 2011-11-09 16:17:48 -08:00
parent e9cff5e17c
commit 665d5df938
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!");
}
} 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!");
}
} 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");
ConcurrentMap<String, Blob> container = getContainerToBlobs().get(containerName);
if (container == null) {
new IllegalStateException("containerName not found: " + containerName);
return Futures.immediateFailedFuture(new IllegalStateException("containerName not found: " + containerName));
}
Blob blob = createUpdatedCopyOfBlobInContainer(containerName, in);
@ -513,7 +513,7 @@ public class TransientAsyncBlobStore extends BaseAsyncBlobStore {
public ListenableFuture<Blob> putBlobAndReturnOld(String containerName, Blob in) {
ConcurrentMap<String, Blob> container = getContainerToBlobs().get(containerName);
if (container == null) {
new IllegalStateException("containerName not found: " + containerName);
return Futures.immediateFailedFuture(new IllegalStateException("containerName not found: " + containerName));
}
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!");
}
} 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!");
}
} catch (InterruptedException e) {
new IllegalStateException(container + " interrupted during deletion!", e);
throw new IllegalStateException(container + " interrupted during deletion!", e);
}
}