> +import java.util.ArrayList;
> +import java.util.List;
> +
> +public class BlobHelper {
> +
> + public static void deleteContainerIfExists(String storage, String key,
> String containerName) {
> + final AzureBlobClient azureBlob =
> ContextBuilder.newBuilder("azureblob")
> + .credentials(storage, key)
> + .buildApi(AzureBlobClient.class);
> +
> + try {
> + azureBlob.deleteContainer(containerName);
> + }
> + catch (Exception e) {
> + e.printStackTrace();
> + }
This will not fail if the container does not exist (see
[here](https://github.com/jclouds/jclouds/blob/master/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobClient.java#L196])).
Should we better not catch any exception, leave just the try/finally and let
the method fail if the container can't be deleted?
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/305/files/cfe9f0b3aaebedf1e91a8934cab0d7f930974f63#r73664326