Package com.google.cloud.hadoop.gcsio
Class GoogleCloudStorageExceptions
- java.lang.Object
-
- com.google.cloud.hadoop.gcsio.GoogleCloudStorageExceptions
-
public final class GoogleCloudStorageExceptions extends Object
Miscellaneous helper methods for standardizing the types of exceptions thrown by the various GCS-based FileSystems.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IOExceptioncreateCompositeException(Collection<IOException> innerExceptions)Creates a composite IOException out of multiple IOExceptions.static FileNotFoundExceptioncreateFileNotFoundException(StorageResourceId resourceId, IOException cause)static FileNotFoundExceptioncreateFileNotFoundException(String bucketName, String objectName, IOException cause)Creates FileNotFoundException with suitable message for a GCS bucket or object.static com.google.api.client.googleapis.json.GoogleJsonResponseExceptioncreateJsonResponseException(com.google.api.client.googleapis.json.GoogleJsonError e, com.google.api.client.http.HttpHeaders responseHeaders)
-
-
-
Method Detail
-
createFileNotFoundException
public static FileNotFoundException createFileNotFoundException(String bucketName, String objectName, @Nullable IOException cause)
Creates FileNotFoundException with suitable message for a GCS bucket or object.
-
createFileNotFoundException
public static FileNotFoundException createFileNotFoundException(StorageResourceId resourceId, @Nullable IOException cause)
-
createCompositeException
public static IOException createCompositeException(Collection<IOException> innerExceptions)
Creates a composite IOException out of multiple IOExceptions. If there is only a singleinnerException, it will be returned as-is without wrapping into an outer exception.
-
createJsonResponseException
public static com.google.api.client.googleapis.json.GoogleJsonResponseException createJsonResponseException(com.google.api.client.googleapis.json.GoogleJsonError e, com.google.api.client.http.HttpHeaders responseHeaders)
-
-