Class GoogleCloudStorageExceptions


  • public final class GoogleCloudStorageExceptions
    extends Object
    Miscellaneous helper methods for standardizing the types of exceptions thrown by the various GCS-based FileSystems.
    • 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.
      • createCompositeException

        public static IOException createCompositeException​(Collection<IOException> innerExceptions)
        Creates a composite IOException out of multiple IOExceptions. If there is only a single innerException, 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)